margin between content and div overflow scrollbar
Posted
by ben
on Stack Overflow
See other posts from Stack Overflow
or by ben
Published on 2010-04-01T08:55:40Z
Indexed on
2010/04/01
9:03 UTC
Read the original article
Hit count: 313
I am using the following bits of code to keep my menu items fixed while allowing for the scrolling of content because it seems to be the most stable method across all browsers.
body { overflow: hidden; }
div.content { height: 100%; overflow: auto; }
My problem is simple, and yet I can not seem to figure it out, the content inside the tag butts up against the scrollbar for the div area and it makes reading much more difficult. How can I get a margin between them (apart from floating a transparent image to the right to create space, there HAS to be a better way)?
© Stack Overflow or respective owner