Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS Background problem!

Status
Not open for further replies.

lexus

MIS
Oct 1, 1998
277
I am setting up some files for a Dreamweaver CSS class that I am teaching and I am driving myself crazy with the following problem. I hope I can explain this clearly!

I have a file called xyz.html in the 'root' of the web. I want to attach a style sheet to it that I have in the /styles folder called yellow.css

I want to assign the background graphic in this style sheet. Sounds simple. The graphic is in the /images folder.

So, here is the basic structure (folders and files)of the web:
'root'
/images
/styles
index.html
education.html
etc......

Dreamweaver puts in the code on the style sheet as:

body {
background-image: url(../images/background.gif);
background-color: #FFFF99;
}

This works fine for previewing in IE 6 but shows no background in Netscape 4.79 (yes, it only shows me the bacground color). All the other codes on the style sheet are called into the xyz.html file just perfectly.

If I change it to:
body {
background-image: url(images/background.gif);
background-color: #FFFF99;
}
It works fine in Netscape but not in IE.

As a last resort, I have even tried putting both statments in and I get nothing. I have been working on this file for 2 days now and I need to get it figured out if I am to teach this.

Any help would gratefully be appreciated!

Thanks,
Lexus **Quiquid latine dictum sit altum viditur.**
 
Hi Lexus,

I realised after I'd sent the last message that I hadn't given you the simplest solution to your problem. You can install 2 different versions of Netscape on your computer so long as you put them into different folders and so long as you have enough umph. Not sure of the system requirements. I keep a copy of Netscape 4.7 which works fine even though I have Netscape 6 installed as well. You could, if you felt brave, even install Netscape 7. Just make sure that you know where Netscape is installed before you install the later version, and make sure you place it in a new folder within Program Files.

Dreamweaver lets you have any number of browsers for the preview. You just add the extra browsers and then select them through the menus rather than F12.

Then, you can demonstrate very easily the difference in how the browsers handle CSS.

Hope this helps too.

Jill.
 
Oops, Lexus, still didn't answer your question. Sorry!

TopStyle should be on your DW CD. DW4 had TopStyle 1.5 and MX has TopStyle 2. They are installed as separate programs so, could be anywhere on those PCs in the classroom, or may not have been installed.

There are some options to set TopStyle as the default CSS editor for Dreamweaver but I'm not sure whether that only works for the paid version. In any case, you can work on a CSS with TopStyle without closing down DW or the files you're working with in DW. The moment any change is made, DW seems to find it okay. The big advantage of TopStyle is the ability to see the effect of the style in the bottom window while you're working. It also keeps everything in the right order for you. I like it.

Jill.
 
Thanks, Jill.

After much searching, I found the answer. Apparently NS 4.79 only "understands" background-image if you use the entire path and not just "images/background.gif" ... **Quiquid latine dictum sit altum viditur.**
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top