+ Reply to Thread
Results 1 to 3 of 3

Thread: Alternate Style Sheets (How do specify a default?)

  1. #1
    moniquedbabin79 is offline x10Hosting Member moniquedbabin79 is an unknown quantity at this point
    Join Date
    Jun 2010
    Posts
    13

    Alternate Style Sheets (How do specify a default?)

    Hello all,

    I am considering adding an alternate style sheet to my new web site (first-ever web site . . . . I'm a newbie!), and I'm not quite sure how to handle the alternate style sheets. I want to make sure that most (preferably all) browsers will understand my default preferences.

    Here's the scenario:
    imagine that I have already saved two separate style sheets, one named "main.css" and another named "alternate.css"

    Then, in the head of my .htm documents, I am going to include the following link elements:

    <link href="main.css" rel="stylesheet" type="text/css" title="Regular Text" />
    <link href="alternate.css" rel="alternate stylesheet" type="text/css" title="Large Text" />

    My textbook states that
    "browsers that support alternate style sheets provide a menu option for the user to select which style sheet to apply," but it doesn't state what happens with browsers that don't support alternate style sheets.

    In the scenario that I present above, will pretty much any browser default to the first link that I present?

    I appreciate any advice on this that you have to offer. I think it's probably good these days to know how to provide alternate styles. I'm guessing that if I stick with this, I will have to learn how to develop a PDA style and many others . . . .

    Thanks so much for your time!

    Cheers,
    M. Babin

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Alternate Style Sheets (How do specify a default?)

    Yes, style sheets that aren't specified as alternates are picked by default, no matter whether or not the browser supports alternates. Some browsers simply ignore alternate style sheets.

    If you want to know what's supposed to happen, go to the standards documents. Read § 14.3.1 of the CSS standard, "Preferred and alternate style sheets", for more. Read also "Alternative Style Sheets".
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    moniquedbabin79 is offline x10Hosting Member moniquedbabin79 is an unknown quantity at this point
    Join Date
    Jun 2010
    Posts
    13

    Re: Alternate Style Sheets (How do specify a default?)

    Thank you so much! These links provide wonderful explanations. I should have thought to check W3C but I am still so new to all this. W3C has such great information and tutorials, and this forum is great too!

    Thanks, again, for your help!

    Cheers,
    M. B.
    Last edited by moniquedbabin79; 06-30-2010 at 10:52 PM.

+ Reply to Thread

Similar Threads

  1. any alternate to remote sql?
    By arnb71 in forum Programming Help
    Replies: 5
    Last Post: 04-19-2010, 04:49 PM
  2. Alternate cpanel URL?
    By stpvoice in forum Free Hosting
    Replies: 6
    Last Post: 12-07-2009, 02:15 PM
  3. Alternate Search Engine you use
    By jaco_don in forum Off Topic
    Replies: 19
    Last Post: 08-05-2008, 09:53 AM
  4. Do you use Style Sheets?
    By bigdbag in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 07-13-2005, 05:02 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers