/    Sign up×
Community /Pin to ProfileBookmark

CSS vs non-CSS browsers

hello, folks.
I saw a piece of code one time that you could stick into a CSS page that could determine whether a viewer’s browser could read CSS. If not, it sent them to an alternate web site. Could someone tell me how to do that? (In small, easy-to-understand words, please. ? )

I wouldn’t be surprised if there’s already something posted here about that, but how to find it?

Thanks
John

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@ray326Apr 08.2006 — Sounds like a WAG to me. Browser sniffing or something.
Copy linkTweet thisAlerts:
@felgallApr 08.2006 — If it is a 21st Century web browser then it understands CSS (at least to some extent). Any browser that doesn't understand CSS-1 and CSS-P is obsolete (eg Netscape 4) or completely dead (eg. IE on the Mac) - the only exceptions would be those browsers where those parts of CSS are not relevant (eg. web readers). Browsers still vary on how much of CSS-2 and CSS-3 they implement.

The other thing about CSS is that everything you put in it are nothing but suggestions because while the web standards say that author CSS takes priority over user CSS every single web browser in existance has implemented it the other way around so that any CSS provided by visitors to your site will override yours anyway.

In the end the only part of the web page that you as author have complete control over is the content between the HTML tags.
Copy linkTweet thisAlerts:
@MoldarinApr 08.2006 — Simple!

[CODE]#csscheck { display: none; }[/CODE]
[code=html]<div id="csscheck"><p>Your need a <strong>modern browser</strong> to see these pages. Get a fresh copy of <a href="http://opera.com/">Opera</a> or go to our <a href="othersite.html" rel="nofollow noindex">alternate site</a> for deprecated browsers.</p></div>[/code]

Note: You shoul instruct search engines not to include the alternate site. You can do this by using robots.txt.
×

Success!

Help @johnL spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...