Stylesheet query; can users switch styles?

  RWest 03:46 15 Dec 2007

I'm toying with the idea of allowing people to change stylesheets when they load a site. (Eg to select white on black text if they prefer it).

However I doubt whether this is possible; the blurb for 'cascading' style sheets suggests there's a general default, but in fact it looks as though each page has to refer to an external file, or set up styles internally - I don't think, once a style is set up, it survives a new html page being loaded.

Anyone tried this?

  Forum Editor 08:22 15 Dec 2007

with a javascript stylesheet switching script. There are lots of them readily available, but here's a good one to get you started:

click here

  Kemistri 13:45 15 Dec 2007
  Forum Editor 17:40 15 Dec 2007

That's a helpful link, but the content on the page was published six years ago - do you happen to know if it works with IE 7.0?

  Kemistri 18:40 15 Dec 2007

I have not had cause to find out, as I have not used style sheet switching for some time. My interest in it has been awoken again by RWest's recent threads, so I might find out soon.

  RWest 19:02 15 Dec 2007

Thanks forum editor - though they don't make it clear I think whether the stylesheet is retained; I don't want people to have to click to select the sheet on each load of a new page. I don't really want to bother with cookies in case people don't want them.

Interesting anti-style sheet piece, admittedly 10 years old
click here

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Galaxy Note 8 vs iPhone X

The secrets of creating gory VFX

How to update iOS on iPhone or iPad

WhatsApp : comment lire vos messages sans que l’expéditeur le sache