Something like PIE to get broken CSS1 and CSS2 (like inline-block, :before, :after) to work in IE7?
I'm working for a site on which we are forced to support IE7 and above. We apply a CSS reset and then use PIE for CSS3 linear gradients, box shadows, etc. defined in a set of SASS mixins so they can be easily applied to styles without a bunch of browser-specific garbage every开发者_高级运维where.
But what can one do about basic CSS like "inline-block" or ":before/:after"? Is there anything like PIE that I can drop in to get IE7 to respond to CSS1 and 2 properly? Something that will allow me to pretend that IE7 is like any other browser so I can just go on writing code without ugly hacks in the markup?
For inline-block
http://foohack.com/2007/11/cross-browser-support-for-inline-block-styling/
For :before
and :after
you could use jquery for that.. or i found this..
:after and :before css pseudo elements hack for IE 7
And.. I dont think theres a solution for inline-block
that doesnt involve css hacks.. unless you wanna go around from using inline-block
On a side note: I dont even recall when I would've had the need to use inline-block
, :before
and :after
精彩评论