mu.nu - We're sorry we accidentally destroyed your panties.

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 10:16 PM | Comments (11) | Add Comment | Trackbacks (Suck)






Processing 0.0, elapsed 0.0072 seconds.
20 queries taking 0.0049 seconds, 21 records returned.
Page size 6 kb.
Powered by Minx 0.8 beta.