First off, the URL:
www.bythetree.com/dev (select "high")
and an alternate page just for reference.:
Second, the problem.
Some of the CSS I am doing seems to be IE only. Specifically, the background-image and aligning the image to negative alignment. So, I am using two stylesheets, oen for Netscape and one for IE.
That itself would be no problem, but I am having some extremely unforeseen problems. The IE stylesheet works when I have the stylesheet on the page itself. It does not however, work when I use the document.write method to choose the stylesheet, nor does it work when I use the <link rel""...> method.
Now, every site that I have checked out says that IE supports the background-image method, but it appears that I have found a bug.
I have tried 5 different browser detection scripts hoping that one of them would work and I get nothing.
Just ahead of time, I have replaced the document.write with an alert to make sure that the script was detecting the browser properly and it does indeed choose the corect browser, I just don't get the background image like I should.
PLEASE PLEASE PLEASE help me out.
I need to finish this project ugently.
If you can't get it working, you could consider reading following small article about CSS @import -tag (which isn't supported by Netscape): http://mar.anomy.net/entry/20010222200000/
Instead of using document.write try using document.writeln and see if it works - it's an acceptable substitute.
It may also be that the JScript || parameters may not be working, in which case have a look at http://www.webreference.com/dhtml/column51/5.html and see how they do the browser detection.
Otherwise I can't see anything wrong... :( Good luck.
possibly...I will look at it tomorrow. The wierd thing is that my site works in Netscape...not in IE. Can you believe it?
Please someone take a look at it and give me some ideas.
Thanks for the suggestions by the way hmahonen.
The only difference between "document.write" and "document.writeln", is that the latter adds a carriage return to the end of the written line. There's no conceivable reason why it should act differently.
So what seems to be the problem exactly? I checked the links in IE 5 and it appears that your styles are working. I remember having a conversation with you a while back on this topic, and I though we had solved the problem, maybe I am missing something here. But what is the desired outcome supposed to be?
yup...I thought we had it solved too.
In IE, the page should be loading a background image set to
-60 offset . In IE (my version at least) it is not loading the image at all.
If you take a look at the styles setup, everything seems set up right. It just looks like either the script is not functioning properly or there is some sort of bug that is preventing IE from utilizing the <link rel> method. The reason I make that last statement is that when I paste the stylesheet in on the page itself, it works just fine.
please please please help me Louie. I am going insane with this!
Andy, the problem is in the Chromeless window, correct? So the bottom frame should have a background image in it?
In your stylesheet, specify ../images/ie_bg.jpg or put the full path to the image.
Thanks for the suggestion. I don't think that's it as the stylesheet works when I paste it direcly onto the page.
No image on the bottom frame. I wanted the text down there to stand out.
Did you even try it? You need to specify the image in relation to the external stylesheet. A full path to the image might be even better.
That might be it...I didn't think about that as I almost always include the CSS as part of my PHP include.
well damn...that did it...
FANTASTIC post OneChance...
I guess that's what I get for nto ever working with external stylsheets. Like I said before, I just never use them