开发者

css special IE7 tag

*html .... (IE6)
html > body ....(IE7/FF)

* html is special tag for IE6.开发者_如何学运维 Does IE7 has something too? i need just some small css detail in IE7. Just for IE7 without FF.


I've already used this answer to another question, but it applies here also:

I have a solution that I use only when I have to, after I build my html & css valid and working in most browsers, I do the occasional hack with this amazing piece of javascript from Rafael Lima. http://rafael.adm.br/css_browser_selector/

It keeps my CSS & HTML valid and clean, I know it's not the ideal solution, using javascript to fix hacks, but as long as your code is originally as close as possible (silly IE just breaks things sometimes) then moving something a few px with javascript isn't as big of a deal as some people think. Plus for time/cost reasons is a quick & easy fix.


there is *:first-child+html, which you can prepend to fieldset. You should be using conditional comments though.

Your rule should look like..

*:first-child+html fieldset { }


* html is not a special tag for IE 6, it's rather an ugly hack exploiting a bug in the browser. You can use the conditional comments to include stylesheet for the various versions of IE:

<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="ie6.css" />
<![endif]-->

<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="ie7.css" />
<![endif]-->


This will proably answer your question: CSS Hacks, but try to avoid them as much as possible :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜