Hello, I am looking for some assistance in making my HTML responsive and with positioning the items on my screen. Below is a picture of how I envision it to look:
Desired Look:
https://i.sstatic.net/84m3H.png
I have been experiencing issues with display grid, flexbox, and absolute positioning. Currently, my screen appears like this:
Current Appearance:
https://i.sstatic.net/q7pRV.png
Although it appears to be responsive, it breaks when viewed on different devices.
Here is the HTML code where I've created divs and included SVG icons. Can you verify if this is correctly structured?
<div class="primaryinformations">
<img src="example.png">
<img id="trash" src="icons/trash.svg">
<img id="edit" src="icons/edit.svg">
<h1>Quirk, o Quokka</h1>
<img id="tennis" src="icons/tennis.svg">
<img id="medkit" src="icons/medkit.svg">
</div>
<div class="secondaryinformations">
<img src="icons/dna.svg">
<h4>Raça </h4>
<h3>Setonyx Brachyurus</h3>
<img src="icons/gender.svg">
<h4>Sexo </h4>
<h3>Macho</h3>
<img src="icons/birthday.svg">
<h4>Data de Nascimento</h4>
<h3>17/07/2021</h3>
<img src="icons/pill.svg">
<h4>Fichas de Medicamento em Andamento</h4>
<h3>2 Medicações em Andamento</h3>
<img src="icons/tennis.svg">
<h4>Atividades em Andamento</h4>
<h3>3 Atividades em Andamento</h3>
</div>
Below is the CSS I have written:
.primaryinformations img{
display: block;
margin-left: auto;
margin-right: auto;
}
.primaryinformations h1{
display: block;
text-align: center;
}
.primaryinformations #trash{
padding-left: 85vw;
position: absolute;
top: 15vw;
}
.primaryinformations #edit{
padding-left: 80vw;
position: absolute;
top: 60vw;
}
.primaryinformations #tennis{
padding-left: 33vw;
position: absolute;
top: 90vw;
}
.primaryinformations #medkit{
padding-left: 55vw;
position: absolute;
top: 90vw;
}
.secondaryinformations {
display: grid;
grid-template-columns: auto auto auto;
padding-top: 25%;
As for the Navbar, I plan to address it in future updates.
If there are any improvements or resources you can recommend for me to study responsiveness, please let me know. Thank you!