Forum Moderators: not2easy

Message Too Old, No Replies

Doctype breaks background image on Mac IE5

         

tigersim303

1:00 pm on May 14, 2004 (gmt 0)

10+ Year Member



Hello all,

I've seen tangental references to this problem before, but no conclusive solution.

In a nutshell: I have a background image defined in css. Everything works just fine, except in Mac IE5.x.

After stripping the file right down I got down to this bare bones version:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xml:lang="en-GB">
<head>
<title>CSS test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
body
{
background-image:url('http://www.google.co.uk/intl/en_uk/images/logo.gif');
background-repeat:repeat-y;
}
</style>
</head>
<body>
<p>Sample Content</p>
</body>
</html>

The document is valid XHTML1.1. The only way I can get Mac IE to do what it's supposed to do is to remove the Doctype. Even using a less stringent DTD like HTML4 Transitional is no good.

Any ideas how I can keep my code standards compliant and validated (for which a Doctype is a pre-requisite) and have it working on the Mac?

<rant>
Needless to say, as usual, all other browsers are fine - Firefox, Safari, WinIE etc. It's just Mac IE, as usual. If I could get back the number of hours lost to Mac IE over the years...
</rant>

:)

Many thanks for any tips!

simon

[edited by: tigersim303 at 3:11 pm (utc) on May 14, 2004]

pageoneresults

1:38 pm on May 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello tigersim303, Welcome to WebmasterWorld!

You should remove the URI reference to your site as it is not permitted here at the board.

In reference to the Mac IE5.1 issue, try removing the single quote marks here...

background-image:url(http://www.google.co.uk/intl/en_uk/images/logo.gif)

I had the same issues way back in the beginning when I started using CSS. We had a member named papabaer who is an absolute guru when it comes to CSS (so are our current moderators for this forum). Apparently those single or double quote marks cause problems for Mac IE5.1. If you look at your log files, you will probably see a bunch of 404s for that background image reference.

tigersim303

3:09 pm on May 14, 2004 (gmt 0)

10+ Year Member



Hello pageoneresults - thanks for the welcome and your speedy reply.

Well, I've tried your suggestion and I'm very happy to say that it works! Many thanks for your suggestion.

My apologies for including the URI to my site. It wasn't meant to be promotional in anyway - just a test directory on my hosting account so that people could see what I was talking about with minimal hassle. I'll be more careful in future!

Thanks again,

tigersim303