IE hacks in One Stylesheet


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 {
<!--[if IE 7]>
. menu li {

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.
Who is Participating?
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
The normal way is to provide alternate stylesheets in the HTML using the IE conditional statements.
Dave BaldwinFixer of ProblemsCommented:
No, CSS doesn't understand the IE conditionals, they work just in the HTML.
MLSLIAuthor Commented:

Is there a way round this like:


or any other inline hacks
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Bob StoneIT GuruCommented:
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 -

There are some that detest css expressions, but if it works best for a particular application, then so be it.
width:expression(document.body.clientWidth > 800? "800px": "auto" );

Open in new window

See the source code in a browser of 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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.