SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Style Switching Troubles

    At my site, I would like people to be able to choose between different backgrounds and different font-sizes and types. I have it all set up to do so, and the background switches work fine, but if you click one of the font buttons, the background disappears.

    The problem is that it uses only one alternate stylesheet at a time, so it's either (a) use the default text and have a background, or (b) choose a text, but have no background.

    Does anyone know how I can make it so that it can set more than one alternate stylesheet at a time? A good example of this is at http://whatdoiknow.org/, where you can choose different justifications and different font sizes.

    BTW, right now I'm using the method explained here: http://www.alistapart.com/stories/alternate/

    All help is appreciated!
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I think that whatdoiknow uses a dynamically generated stylesheet (i.e. with PHP or ASP). One way to do it using the ALA method is to give all styles you want together the same title attribute:
    HTML Code:
    <link rel="stylesheet" type="text/css" href="/styles/bigtext.css" title="Big and Bright" />
    <link rel="stylesheet" type="text/css" href="/styles/orange.css" title="Big and Bright" />

  3. #3
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    I think that whatdoiknow uses a dynamically generated stylesheet (i.e. with PHP or ASP). One way to do it using the ALA method is to give all styles you want together the same title attribute:
    HTML Code:
    <link rel="stylesheet" type="text/css" href="/styles/bigtext.css" title="Big and Bright" />
    <link rel="stylesheet" type="text/css" href="/styles/orange.css" title="Big and Bright" />
    Yes, I noticed that way, but it wouldn't solve my problem because that's for choosing, say one and two, but not one and three. I want users to be able to choose one or two, or one or three. You know what I mean?
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •