[thelist] CSS: div background color discrepancy

Joel D Canfield joel at spinhead.com
Thu Dec 7 14:15:23 CST 2006

> Ive always found that a float:right needs to precede a float:left;

I've never seen that; didn't help in this case

> Change these styles:
> /* removed padding added width */
> #content {
> color:inherit;
> background-color:#ffffff;
> margin:0px;
> width:100%;

bingo; floated divs need a width. if I float a div, it must have a
width. when floating divs, include an explicit declaration of width.
I'll get it right eventually.

> border:0px;
> clear: both;
> float:left;
> }
> If you need a gap between them then change #intranetnav

no gap needed; the percents totaling 98 was the reason no to include the
2% in your sample :)

> If you need to add padding its safer to do this to the children
> because of quirky box-models, #intranetnav use a <p> inside (should do
> anyway).

I suspect that semantically it does need a <p>, but until I feel like
dealing with the additional margin/padding it adds to the nav images,
I'll leave it out.

Other than propagating the changes to the other intranet pages, I think
I'm set.

thanks again, folks


More information about the thelist mailing list