For example, I have a div that has a height of 100px
(I don't know the height, but let's suppose I did). I want to set the margin-bottom
to a percent, so 25%
would be 25px
assuming the previous height. However, the percent seems to be of the document, not the element:
<div style="height:100px;margin-bottom:100%"></div>
The margin should be 100px
but it isn't, it is 100% of the height of the page.
The element is just a line of text that has no background, so using height:150%
theoretically could also work.