I've made the jump from HTML table layout for designing webpages to CSS about a week ago and have since been reading more about it. Yesterday, I read a long post here on Stack overflow where users were knocking float
and how deprecated they are for layout. There was a lot of talk about inline-block
being used in its place.
I have an HTML5 design that I just finished and it looks fantastic in Firefox and Chrome, but when tested in Internet Explorer 7, 8, and 9, the design absolutely explodes. It seems to me that anything in this design that I've floated right is not honored in IE. It just seems to wrap under whatever is to the left of it.
I'd like to know if I'm OK with floats or if I should I be using inline-block
instead. An example of how to have two divs next to one another where one is on the left side and the other on the right, using inline-block
would be nice.
inline-block
may be the current fashion, but floats are still a valuable tool in the toolbox. As for testing various versions of IE, I'd first recommend updating to SP3, this would allow you to run IE8 (and use the developer tools to run in IE6 and IE7 mode) and Microsoft has Internet Explorer Application Compatibility VPC Images that will allow you to run IE9.header
,footer
,article
,sections
, etc? If yes, that's probably your issue. Earlier versions of IE do not default them to block elements. There are easy fixes for these. Google is your friend