Customer Portal

Get Involved. Join the Conversation.

Topic

    Shiloh Madsen
    Linking CSS
    Topic posted October 1, 2008 by Shiloh MadsenBronze Trophy: 5,000+ Points, last edited October 29, 2011 
    1204 Views, 2 Comments
    Title:
    Linking CSS
    Content:
    I seem to be having a problem linking a second stylesheet to my pages. I have a template with an associated linked stylesheet, and this works fine. What do I need to do to link a sub stylesheet to one of the pages which uses this template? Is it even possible given that the individual pages don't actually have head tags to embed the stylesheets in?

    Comment

     

    • Ernie Turner
      Well, in reality you don't have to put stylesheet inclusions in the head, you can put them in the body and they will get included. That's probably against some strict validation rules, but it might be a better option than the only other alternative I can think of, which would be to create a separate template just for that page.
    • Christopher Tarabochia

      Also, you could create your own widget (with just a view file only and some light php conditional sections) for managing your css based on script name or the such. Then use this widget in the template. If you are planning on performing at lot of css expections on pages that might be a way to go. Also, once you load a CSS on your site the browser does not load it again unless there is a change. 

       

      Just some thoughts.

       

      Chris