0
I am trying to make a joke with css and Html5 of this type.
Only it’s causing a lot of problems because
- To
div (content)
principality is not occupying all the height and width of the page. - The Positioning of
div (central)
It appears to be in the middle but when it goes to larger screens it doesn’t happen. Code
* {
margin: 0px;
padding: 0px;
}
body {
background-color: #FF0000;
}
#centro {
position: relative;
margin-top: 20%;
margin-bottom: 15%;
width: 100%;
height: 200px;
margin-right: 0;
margin-left: 0;
background: rgba(255,255,255,0.3);
box-sizing: border-box;
}
section p {
padding: 10px;
font-family: Comic Sans MS;
font-size: 40px;
width: 100%;
height: 80%;
box-sizing: border-box;
text-align: center;
}
footer {
box-sizing: border-box;
padding: 10px;
text-align: center;
}
#content {
width: 100%;
height: 100%;
border: 2px solid #8AC007;
box-sizing: border-box;
}
<div id="content">
<section id="centro">
<p>
Teste
</p>
</section>
<footer>
Teste
</footer>
</div>
Thank you.
Paste your code here too, to facilitate staff analysis.
– user28595
Thanks for the tip
– MANIAMAX