SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: css selector
Threaded View
-
Nov 5, 2003, 13:04 #1
- Join Date
- Sep 2003
- Location
- Essex, England
- Posts
- 55
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
css selector
I'm trying to write a piece of javascript to select a particular css file based on the browsers screen resolution. At the moment I've got this:
Code:var ScrnSize; ScrnSize = screen.width + "x" + screen.height; switch(ScrnSize) { case "800x600": document.write('<link rel="stylesheet" type="text/css" href="style/lowres.css" />'); default: document.write('<link rel="stylesheet" type="text/css" href="style/hires.css" />'); }
Bookmarks