![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
We all know that one trick in dealing with old browsers is to add extra bits of content with class="old", where old is defined as display:none in a style sheet that is @imported so that old browsers never see it and hence don't "none" the display of the content. I use this, for example, to put a heading on my navigation menu in NN4 et al, because they can't handle the CSS-P that I use to move the menu to a place where it's obvious and doesn't need a heading, and to hide the "You should upgrade your browser" message from people who don't need to. (If this is too confusing, check the URL in my .sig with an old and a new browser for an example.) I'm trying to think of a way to do the opposite of this. I want to be able to show certain things only to users of modern browsers. It can't be a JavaScript solution, or rely on server-side browser sniffing. The best I've come up with is to do class="new" where new is defined as display:none in the LINKed style sheet, and as display:whatever-the-default-is in the @imported style sheet. My concern is that there may be old browsers that won't understand (or will botch) display:none. Can anyone point me to a resource that will allay this concern? Any better suggestions? |
#3
| |||
| |||
|
|
I'm trying to think of a way to do the opposite of this. I want to be able to show certain things only to users of modern browsers. |
#4
| |||
| |||
|
|
Greg Schmidt wrote: and to hide the "You should upgrade your browser" message from people who don't need to. Why are you telling people they should upgrade? |
|
I'm trying to think of a way to do the opposite of this. I want to be able to show certain things only to users of modern browsers. Why are you trying to exclude content from users of NS4 et al? |
|
Fret not about which browser your visitors use, and whether it meets your standards. Beyond testing the code in a reasonable set of browsers, you should do nothing in particular for or against any particular browser. |
#5
| |||
| |||
|
|
On Tue, 20 Jul 2004 18:19:21 -0400, Greg Schmidt <gregs (AT) trawna (DOT) com> wrote: I'm trying to think of a way to do the opposite of this. I want to be able to show certain things only to users of modern browsers. Depending on *how* new browsers you want it to show, you might be able to use generated content. Following is supported by at least Gecko, Opera and KHTML. IE (Windows, dunno about Mac versions) doesn't have a clue. div id="someid"></div #someid:after{ content: "This text will be shown"; display: block; /* 'inline' would work, too */ } |
#6
| |||||
| |||||
|
|
Greg Schmidt wrote: Brian wrote: What I actually say is "This site will look much better in a browser that supports current web standards." I tell them that because it's true. :-) It's still unlikely that they care. Probably unlikely that all of them understand the message to begin with. Only web geeks like ciwa* regulars care about "standards". |
|
Nor have you thought this through. I just loaded your home page in Mozilla 0.8, with css disabled. True, 0.8 is not bleeding edge, but it can certainly claim to support web standards as well or better than most browsers. (Lynx might have an edge on HTML; Opera on CSS; I think the DOM crown belongs to Mozilla.) Yet, even though it is a modern browser that supports current web standards, there's your message, looking rather silly. |
|
I'm not trying to exclude content. I don't actually have a use for it right now, but thought it was an interesting exercise, and might be useful down the road. You might have told us that up front. |
|
As another (contrived) example, I might want to congratulate a visitor on using a browser that does support current web standards, and clearly showing this message to someone using NN4 would be inappropriate! Showing such a message to anyone is inappropriate, unless your site is about upgrading browsers. |
|
Beyond testing the code in a reasonable set of browsers, you should do nothing in particular for or against any particular browser. If I do nothing in particular for those old browsers, then the site becomes completely unusable, with things overlapping other things. I could have been clearer. Let me try again: Beyond testing the code in a reasonable set of browsers and making code adjustments to protect them from their bugs, you should do nothing in particular for or against any particular browser. "This site works best in..." is not accounting for bugs. It's casting judgement on the user's software. |
#7
| |||
| |||
|
|
I would argue that by disabling CSS, you have turned your browser into something that does not support current standards. |
#8
| |||
| |||
|
|
I would argue that by disabling CSS, you have turned your browser into something that does not support current standards. |
|
I'd also argue that "only web geeks like ciwa* regulars" know how to disable CSS in their browser, |
|
Nowhere in this thread or on my site do I say that the site works best in any particular browser. It is perfectly usable in all browsers I have tested with (about a dozen). It *looks better* in some than in others. |
#9
| |||||
| |||||
|
|
On Wed, 21 Jul 2004, Greg Schmidt wrote: I would argue that by disabling CSS, you have turned your browser into something that does not support current standards. You're implying that all of your current browsers support, for example, all of CSS2 aural stylesheets? If not, why not? |
|
Fact is, CSS always was and still is intended to be optional: available to be applied per specification in browsing situations where it's appropriate, while able to be ignored / switched off in situations where it's being a nuisance. |
|
I'd also argue that "only web geeks like ciwa* regulars" know how to disable CSS in their browser, Maybe you haven't met any users with special needs. |
|
Only web geeks like ciwa* regulars care about "standards". |
|
Nowhere in this thread or on my site do I say that the site works best in any particular browser. It is perfectly usable in all browsers I have tested with (about a dozen). It *looks better* in some than in others. That's just fine, in the terms that you just said it, but I'm having a hard time seeing it jive with the rest of what you said. |
#10
| |||
| |||
|
|
Greg Schmidt wrote: Nowhere in this thread or on my site do I say that the site works best in any particular browser. It looks like you have, almost. "This site looks better in a modern browser" is one small step away from "This site optimized for Netscape 4". |
|
[...] there is a message on every page of cool designer's site, telling users how to make his site look better. As if that might matter to Jill User. |
|
Instead of "my site will look better if you get Flurbet v 87.3.21.a browser", the message is "this site should work in any HTML browser". |
![]() |
| Thread Tools | |
| Display Modes | |
| |