Matt Fielding wrote:
>>> http://mattu.isa-geek.com/index2.php
>>> 2)
> Georg, your suggestion about using a margin to displace the content div, I
> thought, would cause the content div to start below the navbar.
First: by not setting a width on navbar you may lose some old
browser-versions - they may make it 100% wide. All new browsers should
correctly shrink a float to its content though.
So, here follows a "standard" solution for such 2-column cases.
1: leave the navbar and content as is - separate, and in that order -
navbar first.
2: use the following CSS...
div#navbar {
float: left;
background-color: blue;
margin: 0 1em 0 0;
}
div#content {
background-color: yellow;
overflow: hidden;
}
* html div#content {
overflow: visible;
height: 1%;
}
What you'll get is what I've written about here...
<http://www.gunlaug.no/contents/wd_example_01_02.html>
...see *example 4*. It doesn't matter that you're dealing with an entire
column vs. the single paragraph i use in my article. It will act the
same way.
The content-column will stay 1em to the right of navbar, regardless of
how wide navbar becomes with growing content, font-resizing and all.
----
Note: I'm ever so slightly confused by your CSS selectors.
I'm not sure whether you mean 'div #navbar' or 'div#navbar'.
What you get with the former is "an element with id="navbar" specified
to be within a div".
I opted for the latter which means I'm addressing "a div with
id="navbar" - no matter where it is".
regards
Georg
--
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/