July 08, 2005

Stylesheet Selector

I ran across this little Javascript last night and thought I'd share it with everyone.

This script will load a different stylesheet based on the reader's screen resolution. The code looks fairly simple and straight-forward. You will have to build different stylesheets and either name them the same as the current variables, or change the variables to match your stylesheet names.

I haven't tested it yet, but anything I've used from this source has worked as advertised.

I put links to different stylesheets into Eric's and Herbey's blog templates so that readers at 800x600 screen resolution could view the site with 2 columns instead of the 3 column design used for the default template. I think with this script, it would have been a much easier process.

I'd be interested if anyone tries this to see how it works out.

Posted by Madfish Willie at July 8, 2005 10:16 PM | TrackBack
Comments
Live Comment Preview
Post a comment









Remember personal info?