View Single Post
Old 11-03-2008, 05:01 PM  
potter
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
Quote:
Originally Posted by AlienQ View Post
Uhmm no...
Browser is going to display which one you tell it to.

Meaning ya want it to work with a PSP? Ya do a browser detect either server side or Java script then reference the template or Style sheet you wish it to use. CSS is not going to detect the browser for you.
How do you not understand this? The HTML / server side things don't change. Nothing happens server side.

When you visit a web page. Your browser, psp, or whatever the hell you're using. "Loads" and "Renders" that page. The browser itself knows what it is. When it reads the style sheet link in the head. It'll choose and load the style sheet it knows itself is.

I just don't know how to explain this to you. It should be such simple basic knowledge.

Quote:
3.2 Conformance

This section defines conformance with the CSS2 specification only. There may be other levels of CSS in the future that may require a user agent to implement a different set of features in order to conform.

In general, the following points must be observed by a user agent claiming conformance to this specification:

1. It must support one or more of the CSS2 media types.
2. For each source document, it must attempt to retrieve all associated style sheets that are appropriate for the supported media types. If it cannot retrieve all associated style sheets (for instance, because of network errors), it must display the document using those it can retrieve.
3. It must parse the style sheets according to this specification. In particular, it must recognize all at-rules, blocks, declarations, and selectors (see the grammar of CSS2). If a user agent encounters a property that applies for a supported media type, the user agent must parse the value according to the property definition. This means that the user agent must accept all valid values and must ignore declarations with invalid values. User agents must ignore rules that apply to unsupported media types.
4. For each element in a document tree, it must assign a value for every applicable property according to the property's definition and the rules of cascading and inheritance.
5. If the source document comes with alternate style sheets (such as with the "alternate" keyword in HTML 4.0 [HTML40]), the UA must allow the user to select one from among these style sheets and apply the selected one.

Not every user agent must observe every point, however:

* A user agent that inputs style sheets must respect points 1 - 3.
* An authoring tool is only required to output valid style sheets
* A user agent that renders a document with associated style sheets must respect points 1 - 5 and render the document according to the media-specific requirements set forth in this specification. Values may be approximated when required by the user agent.

The inability of a user agent to implement part of this specification due to the limitations of a particular device (e.g., a user agent cannot render colors on a monochrome monitor or page) does not imply non-conformance.

This specification recommends that a user agent allow the user to specify user style sheets.
Bolded the key part. Since you're incredibly stupid here, "user agent" means the browser.

Do you get it now? Browsers, choose the style sheet. Browsers know what they are, they don't need your server or scripting to tell them what they are. Browsers can READ your header and know which style sheet they're supposed to use.
__________________

potter is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote