SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist Caesar's Avatar
    Join Date
    May 2000
    Location
    On some harddisk
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow Disabling CSS temporarily

    Does anyone know how to disable a style sheet temporarily in a page?

    Eg:
    -------------------------------
    <html><head>
    <link rel="stylesheet" href="styles.css"></head>
    <body>
    <font class=textBig>123 ABC</font>

    <!-- here's where i want to disable it -->

    <h1>ABC 123</h1>
    </body>
    </html>
    --------------------------------

    Any ideas?

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To disable it, just take the link out of your HEAD section, or am I missing something here?

  3. #3
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or put <!--- ---> around it

    Sketch
    Aaron Brazell
    Technosailor



  4. #4
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sketch, HTML-style comments have only two hyphens in them: <!-- comment -->, but that would comment out the code itself, when I believe he's just trying to turn off the style sheet.

  5. #5
    SitePoint Evangelist Caesar's Avatar
    Join Date
    May 2000
    Location
    On some harddisk
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Err, I guess I didn't explain clearly enough.

    I'll like to have the style sheet activated for most parts of the page except for one area.

    Using my example, I'll like to disable the stylesheet for the part with the <h1> tag and right after the <h1> tag, I'll like to activate it again.

  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm sure this could be done with the right coding. YOu should ask yourself WHY you want (or need) to do this though. If it's something in the stylesheet that is causing errors then just style it differently to avoid conflict. It makes no sense to turn the stylesheet off. With a little planning you should be able to solve your problem without resorting to this.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by mattjacob
    Sketch, HTML-style comments have only two hyphens in them: <!-- comment -->, but that would comment out the code itself, when I believe he's just trying to turn off the style sheet.
    Our boy Sketch has apparently been hitting the COld Fusion lately.

    Andrew...in Cold Fusion, the extra hyphen comments out Cold Fusion code from being read by the server. With just the double hyphen, the results would not be displayed but the code would still be run.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


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
  •