SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Nov 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Background table cell image not displaying correctly in Netscape 7.0

    I'm working on this site for an actor friend (which will hopefully launch by the end of this month), but my co-webmaster and I can't get the side graphic (bstripc.jpg) on our template to render in Netscape correctly. She has the graphic coded as a background image in a table cell so it will repeat. In IE 5.0 and 5.5 it works fine, but Netscape 7.0 cuts off the graphic - not only will it not repeat, but it cuts off before the bottom of the graphic. After playing around, I'm pretty sure this is caused by the "height" attribute in the table cell...when I change it to a fixed height (yuck), the strip repeats fine for the fixed height of the page, in both Netscape and IE. If I take off the height attribute, only the very top part of the graphic shows up. I've tried using CSS for the background image, but the same problem occurs. Is there any way I can get the strip to repeat in Netscape without using a fixed height for the cell? And any idea why it's actually cutting off the graphic? I could almost live with the graphic not repeating, if it at least displayed the entire graphic.

    Here's the code in question, and of course you can view the template to see the full code:

    <table cellpadding="0" cellspacing="0" height="100%">
    <tr>

    <td valign="top" width="38">
    <img src="atop.jpg">
    </td>
    <td valign="top" width="136" background="bstripc.jpg">&nbsp;</td>

    And just because I've lurked in these forums for a long time, a few disclaimers :

    First of all, I'm working TONIGHT on adding height/width and alt tags to all of the images - I know this is a big deal with accessibility, and I'm a firm believer in it, so no fears there.

    Second, I know the page really doesn't look great in Netscape 4.5, but the content is still visible - some of the graphics look skeevy, but I'll live with that as long as people can access the info on the site. I also haven't tested in Opera yet, but we wanted to get it working in Netscape and IE first before attacking more problems. *sigh*

    Finally, my co-webmaster and I have slightly different coding styles (I tend to use more CSS than she does, among many other things), so, um, if you think the coding is a little wonky, I lay all of the blame on her. Heh.

    Thanks in advance for any help!

  2. #2
    Degrading Gracefully PalmerB's Avatar
    Join Date
    Sep 2001
    Location
    Ohio - U.S.A. Outlook: Cautiously Optimistic
    Posts
    3,283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think what you need is a spacer .gif to put in that cell with the repeating image. A spacer .gif is a l pixel x 1 pixel invisible image.

    I've added the code to show you what you need to do after you make the invisible .gif...

    <td valign="top" width="136" background="bstripc.jpg">
    <img src="spacer.gif" width="136" height="1" border="0"><br>
    </td>

    That might do it. Good luck,

    Palmer

  3. #3
    SitePoint Member
    Join Date
    Nov 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sadly, I tried your suggestion and it didn't work. But thanks for making it! If you or anyone else has any other ideas, I'd love to hear them!

    Thanks again!

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add this to the stylesheet:

    Code:
    #page {
    background: url(bstripc.jpg) repeat-y;
    background-position: 38px 0px;
    }
    Then, on the VERY first table of the site change it from:

    Code:
    <table cellpadding="0" cellspacing="0" height="100%">
    To this:

    Code:
    <table cellpadding="0" cellspacing="0" height="100%" id="page">
    Notice the id="page". I tested it on NS 7, and it works

    Peter

  5. #5
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Note for backward compatibility:

    Netscape 4 has a terrible bug with regards to background-repeating. Test your code carefully.

    --Vinnie

  6. #6
    SitePoint Member
    Join Date
    Nov 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all, thanks to all of you for responding. Peter, that fixed the problem in Netscape 7.0...I'll be testing in Opera soon, and I'm sure there will be something there to send me screaming toward the comforts of the closest mental institution. Or just here. Heh.

    Vinnie, you're right, NN4.5 didn't like the repeating background, and in fact won't show the background graphic at all. I'm leaning toward just dealing with it if I can't find a workaround, though, since that's only layout stuff and not part of the actual site content. When I code sites on my own (personal ones, anyway...I wouldn't try this with a business site) I've started importing a stylesheet so the CSS formatting breaks in NN4.5, ala www.alistapart.com's suggestion (I think it was them!), just leaving content and a note explaining that the site layout is viewable in a standards-compliant browser but that the content is always accessible to anyone. I've been experimenting with tableless layouts and like that method, and for a personal site (like a blog), I think that's acceptable. Unfortunately I can't get away with that with this one. So GAH on trying to work out the kinks with NN4.5 with this particular layout.

    Anyway, thanks again for everyone's input - I appreciate it!


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
  •