display: inline-block; , .
HTML :
<style>
.figure {
display: inline-block;
}
</style>
<div class="figure">
<img src="littlepony.jpg" alt="My cute little pony" width="13" height="37" />
</div>
, IE6, IE7 Firefox 2:
- IE 6 7 , hasLayout, , , :
<!--[if lte IE 7]>
.figure {
display: inline;
zoom: 1; /* triggering hasLayout */
}
<![endif]-->
- Firefox 2
display: inline-block;, :
.figure {
display: -moz-inline-stack;
display: inline-block;
}
- Firefox 2 . -,
.figure, ... . , , div div.figure img + p
<div>
<img src="littlepony.jpg" alt="Photo of my cute little pony" width="13" height="37" />
<p>Second child of .figure>div and not .figure</div>
</div>
</div>
- ( Fx2) , -moz-inline-stack'ed , . , div :
.figure div {
position: relative;
}
, IE6/7 CSS, .
, , , . td no th. , :
- IE6 7
display: table-sth - your CMS is causing problems that otherwise works fine on another site.
- Firefox 3 support
inline-blockdoesn't help
than yes, it’s better for everyone that you use a table, not a half solution, causing problems for half of your users;)
source
share