How can I hide the user.css from IE in my blog?

Forums » My Opera » My Opera: Feedback, questions and discussions

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

15. May 2010, 10:57:52

QuHno

read a book!

Posts: 1037

How can I hide the user.css from IE in my blog?

I have modified my blog a little bit, but when I made a short cross check with IE8, the page display was messed up. So I rewrote the CSS and some things became better but still quite unpredictable with IE.

IE switches to quirks mode because the delivered DOCTYPE of the blog is HTML 4.01 Transitional, not Strict. When I switch off the "IE 6/7 compatibility mode" of IE by force, the page looks better but still a little bit garbled. I have no problems with a browser that doesn't support some of the used CSS3 features, but when it comes to positioning, the fun ends.

I don't want to use IE CSS hacks, so I'm just asking:
How can I deliver the user.css to all CSS capable browser but only the default my.opera stylesheets to IE?

Can I have a "Hide the user.css from crap browsers that don't implement 10 year old standards correctly" (OK with a nicer and shorter text lol) checkbox in the next my.opera version, please?
DOCTYPE (...) Strict would be welcome too, if possible. smile
Looking for a new home for your blog, albums, mail and forums after my.opera closes at march 1, 2014?

Visit https://vivaldi.net - the new community set up by Jon S. v. Tetzchner and several former Opera employees. Many of us are already there and some of the employees too smile

15. May 2010, 17:16:31

Nailz

Posts: 754

Originally posted by QuHno:

I don't want to use IE CSS hacks, so I'm just asking:
How can I deliver the user.css to all CSS capable browser but only the default my.opera stylesheets to IE?

Can I have a "Hide the user.css from crap browsers that don't implement 10 year old standards correctly" (OK with a nicer and shorter text lol) checkbox in the next my.opera version, please?
DOCTYPE (...) Strict would be welcome too, if possible. smile

Maybe with a IE conditional statement and creative use of @import? -just thinking out loud-

.. IE zzz

16. May 2010, 04:31:59

maswib

aku tresno kowe :)

Posts: 15680

great information up
~tansaH nRimo ing panDhum~
heart 

16. May 2010, 05:04:36

Nailz

Posts: 754

I tried really hard that time!

16. May 2010, 10:56:04 (edited)

QuHno

read a book!

Posts: 1037

Yes I know that
@import "noie.css" screen;

can do the trick because the IE doesn't support it, but that is like browser sniffing. It is not granted that future versions of IE will not understand that rule and I don't believe that IE will behave much better, because MS will still have to solve the massive compatibility burden of all the old intranet applications that can run in IE only.

The other caveat is:
When I do that, I loose the ability to insert quick hacks under
my.opera.com/[USERNAME]/account/usercss.dml#user-css-edit
wink

BTW: The @import must precede all other rules in a stylesheet (see specification) and the server generated rules inserted before my own rules in the user.css break that...
Looking for a new home for your blog, albums, mail and forums after my.opera closes at march 1, 2014?

Visit https://vivaldi.net - the new community set up by Jon S. v. Tetzchner and several former Opera employees. Many of us are already there and some of the employees too smile

17. May 2010, 09:49:19

IE conditional statement should do the job as Nailz wrote (look here: http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx). For example:

The above stylesheet will be included only if you use Internet Explorer version lower than 8.

@import statement can slower page loading time, but I don't remember where I read it, so no link here.

17. May 2010, 20:58:42

QuHno

read a book!

Posts: 1037

Been there, done that wink

See Screenshot with IE 7 and 8 open (JPG 259k). Opera doesn't display the Conditional Comment, the IE displays it as text.

If you look into the source you see:
The code is escaped and made unusable.
Looking for a new home for your blog, albums, mail and forums after my.opera closes at march 1, 2014?

Visit https://vivaldi.net - the new community set up by Jon S. v. Tetzchner and several former Opera employees. Many of us are already there and some of the employees too smile

Forums » My Opera » My Opera: Feedback, questions and discussions