HighDots Forums  

Re: Background URL property in different browsers.

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: Background URL property in different browsers. in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: Background URL property in different browsers. - 07-30-2004 , 11:06 AM






Gaz wrote:

Quote:
I have found an issue when comparing Firefox with IE6 (Windows) where
a page links to a css file that is in it's own directory.
"Its", not "it's".

http://homepages.paradise.net.nz/mattpowe/cartoons/english_02.html

Er... sorry - I got distracted.

Yes, you're right, this is an issue. The CSS1 spec says: "Partial URLs
are interpreted relative to the source of the style sheet, not relative
to the document"

(http://www.w3.org/TR/REC-CSS1#url)

As you may have guessed, IE gets it wrong and Firefox gets it right.

Quote:
link href="css\test.css" type="text/css" rel="stylesheet"
Don't use backslashes in directory paths in HTML or CSS.

--
Mark.
http://tranchant.plus.com/


Reply With Quote
  #2  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: Background URL property in different browsers. - 08-02-2004 , 10:23 AM






Mark Tranchant wrote:

Quote:
As you may have guessed, IE gets it wrong and Firefox gets it right.
Oops - this was just my natural assumption. It's the other way around.

The workaround is to use absolute references from the root of the web space:

background-image: url(/images/bg.jpg);

--
Mark.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.