1

I have seen in the comments of Is quoting the value of url() really necessary? and CSS background-image - What is the correct usage? that Mac IE 5 does not support quotation marks inside the url() function.

Also PPK's CSS page does not mention the url() function at all: http://www.quirksmode.org/css/contents.html

So I would like to know what browser support is like for this function. What browsers recognise the value, which ones require what quotation marks, whitespace, and so on.

I realise that everything released in the past five years probably support all syntaxes. It's the older browsers I am thinking of.

Community
  • 1
  • 1
Nicholas Shanks
  • 10,623
  • 4
  • 56
  • 80

2 Answers2

1

Mac IE5? Serious? :) I think this browser is seriously outdated and not being used anymore :)

Anyhow, according to W3C, it's
body {background-image:url('paper.gif');}

And it works for all (older) browsers. For who are you developing if you need support for this kind of ancient browsers?

Michiel
  • 7,855
  • 16
  • 61
  • 113
  • 1
    According to W3C, it doesn't matter whether you use quotes as long as they match (i.e. not `url('foo")`). – BoltClock Sep 30 '11 at 11:15
  • Your answer, besides being wrong, doesn't attempt to answer the question I asked. – Nicholas Shanks Oct 17 '11 at 16:00
  • Kind of rude to give everyone a vote down who is not agreed with your way of thinking... IE5 is history, serious. Stop trying to get this old-timer back to live. – Michiel Oct 17 '11 at 20:31
1

I have never ever had any issues with background-image for any browser type.

Unless of course you are putting it as a div with no content and not specifying the width and hight of the element...

example usage of background/background-image

#body {background-image:url('mylovelybg.jpg');}

or the long hand (to allow for color and repeating factors

#body {background:url ('mylovelybg.jpg') repeat-x #fff;}
Graeme Leighfield
  • 2,825
  • 3
  • 23
  • 38
  • I asked for browser compatibility, not a syntax example. – Nicholas Shanks Oct 17 '11 at 15:59
  • I clearly stated in my first line "I have never ever had any issues with background-image for any browser type. Unless of course you are putting it as a div with no content and not specifying the width and hight of the element..." So why the down vote? I was trying to give you more information that you orginally requested - I.E help out! Why the down vote?! – Graeme Leighfield Oct 17 '11 at 16:38