Hmmm... HTML issue in Netscape 7

in Genius Bar edited January 2014
I'm hoping there's an HTML geek lurking around, because I have a real head scratcher.

I'm just mocking up some pages to get a feel for how they'll work in various browsers, but when I check <a href=""; target="_blank">this</a> page in Netscape 7 the background image vanishes. If you compare the page in both IE5.2 and NS7 you'll see what I mean.

The page uses the following code to create the background image:

\t&lt;body background="../shared/images/bg_main.gif" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0"&gt;

Which is fine as far as I can tell... the doctype is &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt; because I know this can have a bearing on things, especially in Netscape.

I mean, the background image should work, right?

Apologies, I'm a designer, not a coder in case I'm missing something really obvious... any help much appreciated! <img src="graemlins/embarrassed.gif" border="0" alt="[Embarrassed]" />


  • Reply 1 of 7
    I can't answer your question, but what you want to do can easily be done using CSS2, no image necessary. Only problem with that is that some older browsers aren't gaoing to be able to display CSS2's formatting, although all content will still be available. If you're interested, email me, and I'll try to help you...

    [edit: I lied, I just realized I can answer your question. get rid of the bgcolor="#ffffff" that should help you.]

    [ 10-20-2002: Message edited by: Stroszek ]</p>
  • Reply 2 of 7
    Alas, that has not worked... removing the bgcolor attribute has made no difference... Yeah, I could use CSS to achive the same effect, but then you get into a whole new world of pain with 100% vertical Divs or 100% tables... I mean this should work.

    <a href=""; target="_blank">This new page</a> works with the code:

    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;



    &lt;meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"&gt;

    &lt;meta name="generator" content="Adobe GoLive 6"&gt;

    &lt;title&gt;Bastid Background Image!&lt;/title&gt;


    &lt;body background="bgtest.gif"&gt;




    So it's not the doctype or the &lt;body background="bgtest.gif"&gt; that's stopping it... and there's no fundenmental difference between the two pages.

    It's just nuts. <img src="confused.gif" border="0">
  • Reply 3 of 7
    I had a quick look and think perhaps your .gif is shagged. Is it supposed to be 5000 wide and 1 pixel high? The second link you give is a more reasonable 838 x 8.

    Worth a check anyway.


    I downloaded the first page, find & replaced all the relative urls with references to and switched the background image with the one from the second link.

    It then worked in Chimera (which I assume is the same as Netscape 7 cos it uses Gecko too.)

    [ 10-20-2002: Message edited by: stupider...likeafox ]</p>
  • Reply 4 of 7
    It would seem like there's a limit to the width a background image can be in Netscape 7. I wanted to make sure that the image wouldn't tile even when someone opened the browser window really wide with a high res monitor.

    I got it to work by attaching a style to the body tag and only tiling the image vertically. That way I could get away with a much narrower file.

    It means that Netscape 4.7 users will be slightly left out, but do you know what? I say f**k 'em - they should be using a modern browser!

    Thanks to Stroszek and Stupider... your time was much appreciated!
  • Reply 5 of 7
    Not to sound too picky, but....

    In your code, you say the DOCTYPE is HTML 4.01 Transitional... but you're not conforming to the assigned doctype. A lot of the attributes in your BODY element are not part of that specification.

    You should really be building in XHTML 1.0 Transitional and using Cascading Style Sheets for doing things like setting margins in various elements. Believe it or not, a lot more browsers than you think will support that, and older browsers won't choke on the XHTML sntax either.

    Just trying to make the web a happier place
  • Reply 6 of 7
    Well, when I started, the page WAS conforming to the Transitional doctype! However, as things progressed...

    As I mentioned earlier, I'm the designer not the coder for this job and what I was creating were mock-ups to demonstrate what the site would look like in NS7 and IE.

    I'm sure when the pages are properly constructed, my crappy code will be discarded!

    I'm familiar with XHTML, so I'll pass on your comments to the coder. Many thanks!
  • Reply 7 of 7
    overhopeoverhope Posts: 1,123member
    [quote]Originally posted by stupider...likeafox:

    I had a quick look and think perhaps your .gif is shagged.<hr></blockquote>

    I so want that as an error message from a browser... <img src="graemlins/lol.gif" border="0" alt="[Laughing]" />

    [ 10-21-2002: Message edited by: Overhope ]</p>
Sign In or Register to comment.