Hide CSS from Opera 7

They have: 16 posts

Joined: Nov 2002

Need to hide some CSS from O7 (or O6)?. In tinkering around with O7 this is what I've found.

In your XHTML document you will need:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
'

Then in your CSS you will use:

[xmlns] .myClass_or_#IDHere { CSS stuff here }
'

The CSS will work fine in Mozilla, in IE 5.0 it will be hidden and I'm not sure about other browsers. I need not state a DOCTYPE because the choice did not seem to matter, strict or transitional.

If someone with IE5.5 or 6.0 try this out and post results (CSS hidden or not), it would be appreciated. thx.

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Why would you want to hide your CSS files? ?(

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

There is someone else out in the ether who has hidden things from Opera 7. Try googling for it?

Renegade, sometimes people want to force browsers to display things identically in all (or most) browsers instead of changing their design concepts, and to do this, they must hide some CSS from some browsers that would cause the problems, and hide different CSS from other browsers that is used to "correct" the browser display in the first set of browsers.

I think it's a pain in the arse, but hey, what can ya do?

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

wow, that's cool, I never knew you could do that Laughing out loud

Busy's picture

He has: 6,151 posts

Joined: May 2001

It's probably best you don't know it, cause if you use it you have to adjust it for every new release of browser. better to stick to the basics and wait for the browsers to catch up (only about 2yrs behind)
I was playing with a nice little XML/DOM/CSS layout the other day, worked great until I tried it outside of mozilla Sad

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

At times like those, you just want to pull out all your hair and wish that every browser was compliant don't you?

...you don't? ... must be just me then Sticking out tongue

Busy's picture

He has: 6,151 posts

Joined: May 2001

everyone believes CSS is the bee's knees when in fact it's not all it's cracked up to be. Don't get me wrong it is good and can make less work of things but it has even less support than HTML (or XHTML) does. Even today HTML 4 isn't fully supported by all browsers.
a year or two ago it was "this doesnt work in this browser, this doesnt work in that ..." (html) now today we are having a bigger problem with CSS.
The standards are there and are good but they are way to ahead of themselves, XHTML has been out for about 3 years now and is about to go into XHTML2 but half the browsers can't even support plan XHTML yet, and what about CSS2 (or 3) and xml ... by the time these are fully or close to full support they will be replaced, look at XFORMS etc.
I'm all for the standards etc but bottom line is use what works on the widest range.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.