SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist S7even's Avatar
    Join Date
    Jun 2002
    Posts
    481
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE 5 Mac and background image

    I have an empty absolutly positioned div with a background image like this:
    Code:
    background:url('mbline.gif') repeat-x;
    but the background doesn't show up in IE Mac.

    A similar problem occures in NS4, but in this browser if you put a non breaking space in the div, and set the line-height of the div egual to its height solves the problem. This trick doesn't seem to work in IE 5 Mac though.

    Whats the solution?

  2. #2
    SitePoint Enthusiast Cinders117's Avatar
    Join Date
    Apr 2003
    Location
    Kent, OHio
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, works for me on IE. Whats the URL? I'll see if it's working in my IE from there also if you'd like.
    Just checked it on Mac NN 4.8 and it works fine there also.

  3. #3
    SitePoint Evangelist S7even's Avatar
    Join Date
    Jun 2002
    Posts
    481
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I made some more tests. It seems that this is happening when you use XHTML Strict Doctype.

  4. #4
    SitePoint Evangelist S7even's Avatar
    Join Date
    Jun 2002
    Posts
    481
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, found the problem.
    The url('mbline.gif') should be url(mbline.gif) The quotes coused the problem.

    Strange, couse I thought the right way was with quotes. I don't know why !!

    edit:
    it should be double quotes. url("mbline.gif"). At least this is what is said in the specification.Eric Mayer in the "Cascading Style Sheets" book uses no quotes at all. In any case, both double quotes and no quotes seem to work in all browsers, while single quotes works in all except IE Mac.
    Last edited by S7even; Jun 9, 2003 at 19:35.

  5. #5
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by S7even
    it should be double quotes. url("mbline.gif"). At least this is what is said in the specification.[/font]
    to quote from the W3C site http://www.w3.org/TR/REC-CSS1#url
    The format of a URL value is 'url(' followed by optional white space followed by an optional single quote (') or double quote (") character followed by the URL itself (as defined in [11]) followed by an optional single quote (') or double quote (") character followed by optional whitespace followed by ')'
    (emphasis mine)

    so in theory you can have it without quotes, with single quotes, and double quotes...it just appears that some browsers are a bit fickle when it comes to what they like...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  6. #6
    SitePoint Evangelist S7even's Avatar
    Join Date
    Jun 2002
    Posts
    481
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok
    Then my initial code was correct, and its just that IE Mac has problems with single quotes when in XHTML Strict mode.

  7. #7
    SitePoint Enthusiast Cinders117's Avatar
    Join Date
    Apr 2003
    Location
    Kent, OHio
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah, it'd have to be the strict mode...I didn't have a doctype on my test page and I tried it with and without signle quotes and it all worked. (or it could be IE, it'd been known to act strange)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •