I'm trying to achieve something like this:
https://www.figma.com/file/lqy0NTOiakaxeG5HoJk50f/Untitled?node-id=0%3A1
body {
margin: 0;
background-color: #242038;
}
.header {
color: white;
position: center;
text-align: center;
font-size: 12px;
margin: auto;
width: 50%;
padding: 10px;
font-family: 'Inter', serif;
font-weight: bold;
}
.description {
position: absolute;
left: 20%;
top: 30%;
height: 150px;
transform: translate(-50%, -50%);
border: 5px solid #FFFF00;
padding: 10px;
}
.title button {}
img {
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}
<tr th:each="randomSummerCamp:${randomSummerCamps}">
<div class="header">
<h1 th:text="${randomSummerCamp.title}"></h1>
<h1 th:text="${randomSummerCamp.state}"></h1>
</div>
<div class="description">
<p th:text="${randomSummerCamp.description}"></p>
</div>
<img alt="" th:src="*{'data:image/jpeg;base64,'+{randomSummerCamp.image}}" style="align-content: center" src="">
<button type="button" onclick="document.location.href = '/adventureHolidays/getRandomSummerCamps'">Randomize
again!
</button>
</tr>
That is how I tried so far, but my text inside div is not responsive and its always over image or not positioined well