Rowby Goren
asked on
Why is this 2 column div misbehaving
Hello all,
One day I'll get these centered two column (etc) divs straight in my brain. I seem to ask this same / similar question once (or twice) a year!
Please look at this page:
http://ogrowby.com/centered-div
Why isn't the right column lined up on the top with the left column.
Here's my html:
One day I'll get these centered two column (etc) divs straight in my brain. I seem to ask this same / similar question once (or twice) a year!
Please look at this page:
http://ogrowby.com/centered-div
Why isn't the right column lined up on the top with the left column.
Here's my html:
<div id="citylistcontainer">
<div id="leftcities">Fullerton<br>
Brea<br>
San Bernardino<br>
Colton<br>
West Covina<br>
Riverside<br>
Corona</div>
<div id="rightcities">Rialto<br>
Diamond Bar<br>
San Dimas<br>
Pomona<br>
Fontana<br>
Chino<br>
Rancho Cucamonga<br>
</div>
</div>
Here's my css: #citylistcontainer {
width: 500px ;
margin-left: auto ;
margin-right: auto ;
}
#citylistcontainer #leftcities {
margin-right: 200px ;
}
#citylistcontainer #rightcities {
float: right ;
width: 200px ;
}
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
not to be a party pooper, but I don't think that's going to work for IE7 - I could be wrong of course...
True, add
*display: inline;
zoom: 1;
*display: inline;
zoom: 1;
ASKER
Thanks. Will fix
ASKER
Is this how it should be?
#citylistcontainer #leftcities {
*display: inline;
zoom: 1;
}
#citylistcontainer #leftcities {
display: inline-block;
*display: inline;
zoom: 1;
}
display: inline-block;
*display: inline;
zoom: 1;
}
ASKER
Thanks. Made the modification.
Thanks for your help too kozaiwaniec
Rowby
Thanks for your help too kozaiwaniec
Rowby
ASKER
It worked :)
Rowby