CSS IE and Firefox URL() differences?

They seem to react completely differently...

Page 1 of 1

2 Replies - 886 Views - Last Post: 23 March 2010 - 12:09 PM

#1 krum110487  Icon User is offline

  • D.I.C Regular

Reputation: 39
  • View blog
  • Posts: 291
  • Joined: 07-February 09

CSS IE and Firefox URL() differences?

Posted 22 March 2010 - 12:29 PM

This is kinda bugging me, I am attempting to make a background image for my website.

I can get them to work with the following configuration:

Files and Folders:
root/css/images/music_notes.jpg
root/images/music_notes.jpg


I am using the following css from this location:
root/css/styles.css

.CONTENT{
	background-image: url('images/music_notes.jpg');
}



with all of this setup, it works, but if I take either one of the images out of
root/css/images

OR

root/images

one or the other will stop working (FF & IE)




this is what I am assuming is happening, Firefox is finding images from where I am including the file (the root), and IE is finding the images from where the CSS is located.


now to get to my question, is there a way to fix this (other than the obvious like moving styles to the root) I am attempting to be "neat", for a project I am doing. If I am just an idiot and doing something dumb, it would be nice to know, because this is kinda annoying.

otherwise I will just move stuff around.

THANKS!!


ps. also is there a nice definitive list of problems in CSS like this? it would be nice to have a reference.

Is This A Good Question/Topic? 0
  • +

Replies To: CSS IE and Firefox URL() differences?

#2 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1002
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: CSS IE and Firefox URL() differences?

Posted 23 March 2010 - 01:11 AM

Well I've never come across this problem since I'm a "root" freak.. I mean, I'm always using absolute paths, so providing your website's not in a folder anywhere, simply put url('/images/whatever.png'); and it will *always* work fine whereever the CSS is.

Another alternative would be to put the CSS in the root as you mentioned, which shouldn't really be a problem, it's still "neat" and nothing else would have to move.
Was This Post Helpful? 0
  • +
  • -

#3 krum110487  Icon User is offline

  • D.I.C Regular

Reputation: 39
  • View blog
  • Posts: 291
  • Joined: 07-February 09

Re: CSS IE and Firefox URL() differences?

Posted 23 March 2010 - 12:09 PM

yea, I planned on moving it to the "root" as a fix, but I was just trying to be more clean, although it made more of a headache than anything.

thanks!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1