WordPress.org

Ready to get started?Download WordPress

Forums

Alternate Style Sheets Through JS (2 posts)

  1. bjwhealo9239
    Member
    Posted 7 years ago #

    Okay, I have a something called a style switcher that uses js to "swap" one stylesheet for another in my wordpress blog. The only styling that shows up is the structure defined in my default css file. The problem is the images and background colors are all in this alternate style sheet that can be changed by clicking on a button.

    My problem is that I dont know how to referance the files. Should I just put in full path names in my header.php file so that there is no confusion in where the stylesheets are located. Even when I do this the syle is not applied to the blog.

    I am not sure if it is just getting overridden by the default css file or if I need to link in another manner.

    Please help if you can.

    http://www.bradywhealonphotography.org

  2. Kafkaesqui

    Posted 7 years ago #

    Your 'style' links call the js function setActiveStyleSheet(). But, where's that function defined? I see no js references in your source. As well as no additional stylesheets showing up in your <head> (which is part of how that particular script is supposed to work).

    I'd go back to the source and read up on what you're trying to do:

    http://alistapart.com/stories/alternate/

Topic Closed

This topic has been closed to new replies.

About this Topic