2
I own a page .xhtml
and the first element to be placed is a div
(content) and I set for her a higher margin(margin-top
) of 30%.
Supposedly, from what I understand, this percentage should be taken from the height of my screen, in my case I have a screen of 1600 795 and the 30% would be taken from the 795px.
See what happens:
#content
{
width: 300px;
height: 200px;
margin: 0 auto;
margin-top: 50%;
background: red;
}
<div id="content">
</div>
In the example I put 50% of margin-top
to be able to pass the perception of what happens. It should be at 50% of the top but seems to have descended much more.
Fiddle isn’t giving the idea 100% but I believe it already helps.
– Cold