|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
Join Date: Jan 2002
Location: Barcelona
Posts: 85
|
js css redirect problem
I'm using this js to select a css depending on screen resolution:
if (window.screen.width <= 800) { document.write(''); document.write(''); } if (window.screen.width > 800) { document.write(''); document.write(''); } It's in an external js file and here's the relevant bit of the html file: It works fine for ie and opera but not in Firefox so I was wondering if there was anything wrong with the way I've done it? Craig |
|
|
|
|
|
#2 |
|
Moderator
Staff
Premium Member
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
|
Can you post the script verbatim as you have it on the webpage? Spacing and such really do matter, especially since Firefox is a more strict code reader than MSIE or Opera. Use the [ php ] tags.
kram
__________________
"For today, goodbye. For tomorrow, good luck. And forever, Go Blue!"
University of Michigan President Mary Sue Coleman |
|
|
|
|
|
#3 |
|
Member (7 bit)
Join Date: Jan 2002
Location: Barcelona
Posts: 85
|
sorry. here are the important parts from the head and external js file:
HTML Code:
<link href="glasgowapartment.css" rel="stylesheet" type="text/css" /> <link href="index.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="glasgowapartment.js"></script> <link rel="shortcut icon" href="favicon.ico" /> Code:
if (window.screen.width <= 800) {
document.write('
Craig |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|