*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.
*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.
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]-->
As meder says, you can use the
*:first-child + html fieldset
selector.
However, I'd recommend that you use conditional comments instead. If you don't need to link to a separate IE-catering stylesheet (as dark_charlie suggests), just use the conditional comments on a <style>
element in your HTML instead. Put your IE7 styles there:
<!--[if IE 7]>
<style>
fieldset {
/* Your IE7 styles for <fieldset> go here */
}
</style>
<![endif]-->
The same goes for IE6 - use a separate set of conditional comments but open using <!--[if IE 6]>
instead.
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.