MLSLI
asked on
IE hacks in One Stylesheet
Hello,
I was wondering if anyone knew if it possible to use IE hacks in one stylesheet.
We have tried but they don't work. The below example does not work.
. menu li {
background-color:red;
}
<!--[if IE 7]>
. menu li {
background-color:yellow;
}
<![endif]-->
I need to do something like this because we are building a Website Template builder that shares one page with a CSS stylesheet changing the entire look.
I was wondering if anyone knew if it possible to use IE hacks in one stylesheet.
We have tried but they don't work. The below example does not work.
. menu li {
background-color:red;
}
<!--[if IE 7]>
. menu li {
background-color:yellow;
}
<![endif]-->
I need to do something like this because we are building a Website Template builder that shares one page with a CSS stylesheet changing the entire look.
No, CSS doesn't understand the IE conditionals, they work just in the HTML.
ASKER
DaveBaldwin:
Is there a way round this like:
<!important>
or any other inline hacks
Is there a way round this like:
<!important>
or any other inline hacks
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
You can put java script into CSS files using expressions
Like this makes browsers that don't normally support max-width do so with a bit of script
See -
http://gadgetopia.com/post/2774
http://webfx.eae.net/dhtml/cssexpr/cssexpr.html
There are some that detest css expressions, but if it works best for a particular application, then so be it.
Like this makes browsers that don't normally support max-width do so with a bit of script
See -
http://gadgetopia.com/post/2774
http://webfx.eae.net/dhtml/cssexpr/cssexpr.html
There are some that detest css expressions, but if it works best for a particular application, then so be it.
p
{
max-width:800px;
width:expression(document.body.clientWidth > 800? "800px": "auto" );
}
See the source code in a browser of www.toys-shop.gr we have implemented what you ask ..
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.