...

View Full Version : display:inline-block; not working in IE7



jarv
08-09-2012, 02:31 PM
hi,

I have a list:



<style>
ul li { display:inline-block; }
</style>

<ul>
<li>link 1</li>
<li>link 2</li>
<li>link 3</li>
</ul>


the inline-block makes my list appear in a horizontal line (on the same line)
whereas in IE my list is is on separate lines?!

AndrewGSW
08-09-2012, 02:37 PM
Does your page have a correct DOCTYPE declaration?

Have you validated the HTML and CSS?

coothead
08-09-2012, 02:57 PM
Hi there jarv,

I believe that this is the "hack" for IE7...

element {
display:inline-block;
*display:inline;
zoom:1;
}

...but haven't tested it recently, as IE8 is as far back as I normally go. :D

If that does not work, try swapping the positions of "display:inline-block;" and "*display:inline;"

coothead



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum