Float not working?

liunx

Guest
I'm trying to achieve the following:

FLOAT.LEFT.DIV.|.FLOAT.RIGHT.DIV

However, for whatever reason, I'm coming up with this:

FLOAT.LEFT.DIV.|
.......................|.FLOAT.RIGHT.DIV

What the heck am I doing wrong?
What would be the proper HTML / CSS code?

I currently have this:

HTML
----------
<div id="left"></div>
<div id="right"></div>

CSS
----------
#left { float:left; margin-right:130px; }
#right { float:right; width: 125px; }

Am I missing something?

Thanx.A DIV is a block object, and that will force a hard return. Use SPAN instead.The #left div is too wide. Try something like this

#left { float:left; width:65%; background:#f00; }
#right { float:right; width: 30%; background:#0f0;}
 
Back
Top