Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2009
    Posts
    136
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Second stylesheet not used

    I've got a feeling that alcohol may be to blame but can anyone tell me why my second stylesheet doesn't work? The page is generated partly by PHP but if you look at the source for this page you should see:

    Code:
    <link rel="stylesheet" type="text/css" href="./styles/default.css" title="default" />
    <link rel="stylesheet" type="text/css" href="./styles/boxtoy.css" title="boxtoy" />
    The intention is that the styles for the "boxtoy" DIV should be in the second sheet but when they go there they are ignored. Using Dragonfly in Opera the sheet seems correctly linked and both HTML and the second stylesheet validate (and the boxtoy styles work fine when I put them in the main stylesheet).

    I have temporarily applied just one style in the second sheet to reduce the chances of me messing up in there.

    Preparing to look stupid.....

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,862
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    <link rel="stylesheet" type="text/css" href="./styles/boxtoy.css" title="boxtoy" />
    Seems like you are not aware of the purpose of title attribute of <link> tag. Read https://developer.mozilla.org/en/Cor...al_Stylesheets and http://www.alistapart.com/articles/alternate/
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Jul 2009
    Posts
    136
    Thanks
    0
    Thanked 7 Times in 7 Posts
    You are right - thanks. Never seen that before and was using the titles for another reason.


  •  

    Posting Permissions

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