user2939345 user2939345 - 5 months ago 13
HTML Question

Floating divs in list (Google Chrome)

I need two divs to be next to eachother in a list. The following code works fine in Firefox, but not in Google Chrome:

<div style="float:left;">DIV 1</div>
<div>DIV 2</div>

See the bullet position in Google Chrome:

Bullet position in Google Chomre

What am I doing wrong?


Rather than using float:left; use display:inline-block; on both div's. That will allow them to be in the same line. Here's an updated Fiddle showing that: