Reputation: 2210
I'm trying to design a site with a fixed header and fixed sidebars, on a 100% height body. The only problem is I can't place the content correctly, it goes over my header.
See this fiddle : http://jsfiddle.net/3FwNM/
I tried to put
margin:100px 0 0 0;
to my #content, but it push it and then a scrollbar appears on the body, I want to avoid that. Scrollbar should appear only on #content.
Any help would be appreciated
Upvotes: 0
Views: 67
Reputation: 702
One trick here is to add box-sizing: border-box
to #primary
and #secondary
. This prevents the padding at the top from increasing the height beyond 100%
EDIT: updated with vendor prefixes for box-sizing
Upvotes: 1