Forum Moderators: not2easy

Message Too Old, No Replies

CSS Problem in Firefox

Works fine Netscape/IE

         

carfac

7:22 pm on Feb 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a bit of CSS on my site that works fine for IE/Netscape, but breaks for Firefox. I am probably not using CSS correctly, or taking advantage of a quirk or something... but I would like it to work on all platforms...

The basic idea is to cover one of my images with a transfarent GIF, to help protect my images (we've all been there, right?) Mine gets a bit more complicated- I actually use a dynamic style sheet to return the image name from a database (if the referer is correct)- so it has a few nice protections in it.

The basic code on the page is this:

<img id="unique_id" src="http://www.my_site.com/images/tp.gif" alt="image_title" width="175" />

where "unique_id" is a number that id's the entry in the database, and tp.gif is a transperant gif.

The CSS is this:

#<%unique_id%> {background: url(http://www.my_site.com/images/<%path_to_image%>) no-repeat;}

where "unique_id" is is the SAME number as above. When the page calls the CSS, there is a CGI in between to pull the "path_to_image"- so that is not the problem.

Like I said, works great in IE/Netscape... but I do not get the BG image showing in Firefox.

Any great ideas out there?

Thanks!

Dave

yowza

8:03 pm on Feb 6, 2005 (gmt 0)

10+ Year Member



I don't think you are supposed to use underscores in css. Try it without and see if it works.

carfac

11:12 pm on Feb 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry- the underscored terms were just there as an example- like "my_site" rather than what it really is. The actual code has no underscores...

dave