Main

octobre 26, 2003

CSS float on both side ?

Okay, I opened up top style and did some playing until I got something that looked fairly the same in both Mozilla and IE.

CODE
#log {
float:right;
margin-top:0px;
margin-right:10px;
width:560px;
}
#menu1 {
float:left;
margin-top:10px;
margin-left:10px;
width:155px;
}


Note that when you are using floats, the top, left, right, and bottom properties should be margin-top, margin-left, margin-right, and margin-bottom as needed... the others are for absolute positioning and don't always do the same thing on floating styles.

And because you are inside a table, I don't think you'll have any problem using both a float:right and a float:left like you might without the table. So this *should* work.

Post back if you have any more problems with this!

Kristine

DocType

http://www.alistapart.com/articles/doctype/