John Carney
asked on
Conditional statement that switches style sheets in a web page
I need a conditional statement for IE6 (and lower) in the header of my web page that will switch style sheets from the default style1.css to style2.css.
Thanks,
John
Thanks,
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. If you can, please let me know the proper syntax for overriding a particular style within the css itself, assuming that's something that can be done.
-John
-John
You just make another rule that has the same selector as the first rule. Wherever there is more than one declaration for the same property in rules that have the same the specificity, the last declaration is the one that will be used, unless overridden by a rule that has a higher specificity.
In short, the cascade is a wonderful thing.
In short, the cascade is a wonderful thing.
ASKER
For that matter can you put the IE6 conditional statements in the css itself so that
background: url(images/image1.png);
could be replaced with this in IE6:
background: url(images/image2.jpg);
or whatever
If so, how would that be stated exactly?
Thanks.
Open in new window