SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Style nested in NoScript Problem

    I recently had one HTML validation problem solved and have one more that needs a solution and then I'll leave you all alone

    I've used some accessible menus that are dynamic when JavaScript is switched on but still degrade gracefully into a list when JavaScript is switched off. However so that I don't get an unstyled list when JavaScript is off I was hoping to be able to style this version.

    Now, I thought I'd created the perfect solution. Create a style inside a noscript so that when JavaScript is switched comes into play. This all works fine however when I came to validate my page it failed as apparently Style cannot be nested inside NoScript.

    Is there a way that style can be applied inside noscript or am i onto a loser and just going to have to live with the unstyled unordered list when JavaScript is off?

    Again there's a working example of this at http://www.unitedonline.co.uk/

    Thanks in advance.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not declare the styling for a class (in the normal style sheet), and set this class for the menu only when it's created by JavaScript?
    Birnam wood is come to Dunsinane


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
  •