html - IE7 does not understand display: inline-block -
can please me head around bug? firefox working fine internet explorer 7 not. seems not understand display: inline-block;
.
html:
<div class="frame-header"> <h2>...</h2> </div>
css:
.frame-header { height:25px; display:inline-block; }
the ie7 display: inline-block;
hack follows:
display: inline-block; *display: inline; zoom: 1;
by default, ie7 supports inline-block
on naturally inline
elements (quirksmode compatibility table), need hack other elements.
zoom: 1
there trigger haslayout
behaviour, , use star property hack setting display
inline
in ie7 , lower (newer browsers won't apply that). haslayout
, inline
trigger inline-block
behaviour in ie7, happy.
this css not validate, , can make stylesheet messed anyways, using ie7-only stylesheet through conditional comments idea.
<!–-[if ie 7]> <link rel="stylesheet" href="ie7.css" type="text/css" /> <![endif]–->
Comments
Post a Comment