You also need to give the second DIV a float rule, as the background
you see on the left DIV is actually on the second DIV which also goes
behind it.

Use Aardvark Firefox extension to see where your DIVs start and end
(it can temporarily put red borders around the DIVs as you move your
mouse over them) http://www.karmatics.com/aardvark/

That's also why in this adapted code, I've given the DIV's IDs (so
Aardvark shows me which ones start where) and made the background
colour blue (so the red borders show up OK).

<div style="float: left; width 65%;" id="left">
      LEFT
</div>
<div style="background-color: blue; float: left;" id="right">
      RIGHT
</div>


Paul.
 --
 http://www.nice-design.co.uk/



On 22/07/05, Lst Recv <[EMAIL PROTECTED]> wrote:
> Hi.
> 
> I'm trying to do a simple two col layout, with one col being
> background colored, and I'm perplexed to find that the bg-color is put
> in both columns!
> 
> <div style="float: left; width 65%;">
>        LEFT
> </div>
> <div style="background-color: red;">
>        RIGHT
> </div>
> 
> But, both columns are colored red!  Try it, and you'll see.
> Why is this?  More importantly, how can I acheive my desired result
> (two col fluid, with the right col colored red)?
> 
> (Note: IE ironically enough does not exhibit this behavior).
> 
> --
> (BTW, thanks for the w3c and w3school references - they're very informative)
> ______________________________________________________________________
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to