|
Posted by VK on May 15, 2006, 1:55 pm
Please log in for more thread options
darius wrote:
> Hi
>
> I'm using CSS div to lay out my page.
>
> I have the following
>
>
> #layoutwrapper {
> margin: 0;
> padding: 40px 80px 10px 20px;
> }
>
> #navbar {
> width: 211px;
> position: absolute;
> top: 80px;
> left: 30px;
> z-index:2000;
> }
>
> #mainbox {
> position: relative;
> left: 255px;
> margin-right: 300px;
> min-width: 500px;
>
> }
>
> I think it's fairly self-explanatory.
>
> <div id="layoutwrapper">
> <div id="navbar">navigation bar here
> </div>
> <div id="mainbox">main content here
> </div>
> </div>
>
> Here's what I don't understand. My intention is to leave ~100px empty on
> the right side (for the screen, anyway). Yet the way I achieve this is
> by setting #mainbox margin-right to 300px (!) Why? If I leave out
> margin-right, I expect it to expand up to the width of the window, but it
> actually takes more than that, forcing horizontal scrolling to see the
> whole mainbox. Obviously it has to do with the navbar, but I don't know
> quite how.
You may want to ask your question at
<comp.infosystems.www.authoring.stylesheets> instead.
"STRICTly speaking, what is 100%?" thread may be of your particular
interest:
<http://groups.google.com/group/comp.infosystems.www.authoring.stylesheets/browse_frm/thread/9d67e80f2b619804>
|