Given the following HTML layout:
<body> <header class="site-header"> </header> <section class="site-section"> </section> <footer class="site-footer"> </footer> </body>
I want to use 100% of the browser height for the header, section, and footer. However, there is no problem for this:
html, body { height:100%; } .site-header { height:10%; } .site-section { height:80%; } .site-footer { height:10%; }
My problem is that this will not work if I want to use a marker for each child of the body
:
body > * { margin:1%; }
Regardless of whether there is margin or not, the site should always use 100% of the height of the browser.
EDIT: It seems more appropriate for me to use a white border instead. However, the same problem remains. Is it even possible to specify border-width
in percent?
source share