Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. How to change CSS at run time by Javascript?

How to change CSS at run time by Javascript?

Scheduled Pinned Locked Moved Web Development
javascriptcsstutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vipin Chauhan
    wrote on last edited by
    #1

    I have different css style sheets.Each of which has different color scheme for the web site.I have used the <Link rel="stylesheet" type="text/css" href="css/stylesheet.css"> tag to apply the css style sheet. I want to allow the user to choose from those different color schemes and apply that color scheme to entire web site.So How I change the css style sheet at runtime. Basically, I want to change the href attribute of <Link> tag. Is there any way to apply style sheet that user selects? Thanks, Vipin Chauhan

    E 1 Reply Last reply
    0
    • V Vipin Chauhan

      I have different css style sheets.Each of which has different color scheme for the web site.I have used the <Link rel="stylesheet" type="text/css" href="css/stylesheet.css"> tag to apply the css style sheet. I want to allow the user to choose from those different color schemes and apply that color scheme to entire web site.So How I change the css style sheet at runtime. Basically, I want to change the href attribute of <Link> tag. Is there any way to apply style sheet that user selects? Thanks, Vipin Chauhan

      E Offline
      E Offline
      Ed Poore
      wrote on last edited by
      #2

      Google it? First result[^] from searching "dynamic stylesheet javascript".


      My Blog[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups