inline-block vs float

With display:inline-block finally ready for everyday use across the most popular browsers (in all honesty, it has been for a while now), I quickly hit a pretty big dilemma. When comparing inline-block to floats, it wasn’t immediately clear what the exact differences were and what method to prefer. I looked online but couldn’t find a source listing the difference between the two. Guess that’s a good reason for keeping a blog then.

Note that inline-block still needs fixes in IE6 and IE7 (more about that later this week) and isn’t supported in FireFox versions prior to FF3. There is a -moz fix if you still want to support these browsers though. Apart from those (easy to fix) issues, you can play around with it all you like…

Leave a Reply

Your email address will not be published. Required fields are marked *