How to get display:table-cell
support in IE? I need lightest solution.
问题:
回答1:
the fastest (but not clean) solution is to wrap your container by a table inside a conditional comment like so
<!--[if lte IE 7 ]><table><td><![endif]-->
<div>
<!-- your markup here -->
</div>
<!--[if lte IE 7 ]></td></table><![endif]-->
Could be acceptable for a single page, but definitely to avoid in a large scale
otherwise you could specify in detail why are you trying to define a display: table-cell. if this is somewhat related to obtain a vertical alignment of text you could take a look to this snippet of code
http://jsfiddle.net/fcalderan/985e4/
-- edit (after comment)
If you wish to obtain a bottom alignment you could also set position : relative
to the image container and then position: absolute; bottom: 0;
to the image
-- edit 2 (after comment)
We are still waiting your code. Anyway the resulting css will be
#imagecontainer { /* or whatever image container you have */
position: relative;
}
#imagecontainer img {
position: absolute;
bottom : 0;
left: 50%;
margin-left:-n/2px; /* where 'n' is width of your image */
}
回答2:
Probably if you look at the test site, which use display: table-cell
in different combinations, you can easier choose the CSS settings which you need?
回答3:
No versions of Internet Explorer (including IE8) support the property values "inline-table", "run-in", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-row", or "table-row-group".
This is the note from w3schools
I think you should try another way.