473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Wired CSS XHTML

Just had a look at the Wired.com site and it seems it's completely in
XHTML and CSS. I don't understand this snippet of code on their
homepage, though:

<link rel="stylesheet" type="text/css" media="screen"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/cs4/wnScreen.css"
/>
<link rel="stylesheet" type="text/css" media="aural,braille,embossed"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/wnOther.css"
/>
<link rel="stylesheet" type="text/css" media="print"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/wnPrint.css"
/>
<link rel="alternate stylesheet" type="text/css" media="screen,print"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/wnSm.css"
title="Small Text" />
<link rel="alternate stylesheet" type="text/css" media="screen,print"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/wnLg.css"
title="Large Text" />
<link rel="alternate stylesheet" type="text/css" media="screen,print"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/wnLg2.css"
title="Larger Text" />
</head>

<body id="LMR" onload="setStyle();" >

How do they detect the Media visiting the site. Isn't CSS/XHTML
supposed to detect this by itself, why do they need Javascript? Anyone
care to explain? Thanks!
Jul 20 '05 #1
1 3000
Jocab wrote:
Just had a look at the Wired.com site and it seems it's completely in
XHTML and CSS. I don't understand this snippet of code on their
homepage, though:

<link rel="stylesheet" type="text/css" media="screen"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/cs4/wnScreen.css"
/>
<link rel="stylesheet" type="text/css" media="aural,braille,embossed"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/wnOther.css"
/>
<link rel="stylesheet" type="text/css" media="print"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/wnPrint.css"
/>
<link rel="alternate stylesheet" type="text/css" media="screen,print"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/wnSm.css"
title="Small Text" />
<link rel="alternate stylesheet" type="text/css" media="screen,print"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/wnLg.css"
title="Large Text" />
<link rel="alternate stylesheet" type="text/css" media="screen,print"
href="http://a1112.g.akamai.net/7/1112/492/2002091447/www.wired.com/news/v/20020914/css/wnLg2.css"
title="Larger Text" />
</head>

<body id="LMR" onload="setStyle();" >

How do they detect the Media visiting the site.
They don't.

Isn't CSS/XHTML supposed to detect this by itself, why do
they need Javascript?


Not CSS/XHTML - it's the browser/User Agent that is supposed to get the
stylesheet for its media type.

And the browser should make alternate stylesheets for the supported
media type available to the user, in this case the "Small Text", Large
Text" and "Larger Text". Some browsers don't do that, so the Javascript
is kinda a workaround for that, in combination with the "Text Size"
feature in the right part of the green bar; additionally it saves the
preferred stylesheet in a cookie.
Matthias

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Peter Rohleder | last post by:
Hi, I have a few simple questions in order to use modularized xhtml and getting it to work. A simple example may make this obviouse: Lets say we want to create a simple xml-file to reflect...
3
by: HTML-JSClub | last post by:
Just asking for opinions on whether I should subscribe to Wired (and why). Thanks
32
by: jp29 | last post by:
My take on problems composing, serving and rendering XHTML documents/web pages: 1. Typical conscientious web authors are producing XHTML documents (Web pages) that feature valid Markup and with...
16
by: Mcginkel | last post by:
I am trying to find a way to load XHTML content in an Iframe. I use to do this in html by using the following code : var iframeObject = document.createElement("iframe");...
2
by: Joris Janssens | last post by:
I'm trying to write a program for validating XHTML 1.1-documents against the XHTML 1.1 DTD (which is actually the same as validating an XML-file) but I always get a "(404) Not found" error. This...
12
by: Alex D. | last post by:
How can I stop asp.net from rendering XHTML istead of HTML? My javascripts are rendering wrong because of that. It is rendering &amp; to clients instead of &. Any help? Thanks, Alejandro.
6
by: dmcglynn | last post by:
Hello all.. I have a strange issue. I am trying to do an opendir via a UNC path, from my windows server to another windows machine. As long as my remote machine is on a physically wired...
0
by: Terry Reedy | last post by:
from Wired magazine, April 2008 (arrived today), p.44: Expired: ASP.NET; Tired: PHP; Wired: Django Congrats to the Django crew. http://www.djangoproject.com/
1
by: mebemikeyc | last post by:
With Element.addEventListener, you can easily wire-up several different event handlers on the fly. This works great, but debugging can be difficult if I don't know what exactly is reacting to an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.