SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with Netscape and TABLES

    I'm trying to create a table and in one of the cells, I wanna put a background image. It will display fine in IE, but it won't even show up with Netscape 4. I've been trying to figure out why, but can't seem to find an answer. I've even tried placing the image that I'm using as a background in the cell as just an image, but that won't work either. Here is a sample of my code:

    <table width="167" height="705" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="12"><img src="images/PURPLE_top_left.gif" width="22" height="21"></td>
    <td width="142" height="21" background="images/PURPLE_top_bar.gif">&nbsp;</td>
    <td width="13"><img src="images/PURPLE_top_right.gif" width="22" height="21"></td>
    </tr>
    <tr>
    <td height="658" background="images/PURPLE_left_bar.gif">&nbsp;</td>
    <td bgcolor="A471A9">&nbsp;</td>
    <td align="left" valign="middle" background="images/PURPLE_right_bar.gif"><img src="images/PURPLE_right_bar.gif" width="22" height="1"></td>
    </tr>
    <tr>
    <td><img src="images/PURPLE_bottom_left.gif" width="22" height="25"></td>
    <td height="10" background="images/PURPLE_bottom_bar.gif">&nbsp;</td>
    <td><img src="images/PURPLE_bottom_right.gif" width="22" height="25"></td>
    </tr>
    </table>

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) Does the image exist in the location you are specifying?
    2) Is the file name correct? If you're on a UNIX server then case is important. PURPLE_top_left.gif is different from purple_top_left.gif or even puRPLE_top_left.gif
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, all is correct..........this works fine with IE, but not with Netscape 4. This is where I am having the problem.

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does this code exist online somewhere? Can you post a link to the actual page?
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it doesn't yet cause i'm workin on it, but I will post one now.

    Click here

    It works perfect in IE, but in Netscape 4, the four borders have background images set for them but they don't show up. Wierd.

    Any help would be great. Thx a lot

  6. #6
    SitePoint Guru nagrom's Avatar
    Join Date
    Jul 2001
    Location
    Western CT, USA
    Posts
    803
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try using a spacer gif, i think NS4 ignores backgrounds in empty cells (or cells with only a space in them)

    <td width="142" height="21" background="images/PURPLE_top_bar.gif"><img src="images/clear.gif" width="142" height="21" border="0" /></td>

  7. #7
    SitePoint Wizard Goof's Avatar
    Join Date
    Feb 2001
    Location
    Pittsburgh, PA
    Posts
    1,154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nagrom is correct. However a space (&nbsp;, not just a space character) within paragraph tags should also do it (and wouldn't call for an extra GET command and download for the browser). Just add a space within paragraph tags like this:
    Code:
    <table width="167" height="705" border="0" cellpadding="0" cellspacing="0"> 
    <tr> 
    <td width="12"><img src="images/PURPLE_top_left.gif" width="22" height="21"></td> 
    <td width="142" height="21" background="images/PURPLE_top_bar.gif"> </td> 
    <td width="13"><img src="images/PURPLE_top_right.gif" width="22" height="21"></td> 
    </tr> 
    <tr> 
    <td height="658" background="images/PURPLE_left_bar.gif"> </td> 
    <td bgcolor="A471A9"><p>&nbsp;</p></td> 
    <td align="left" valign="middle" background="images/PURPLE_right_bar.gif"><img src="images/PURPLE_right_bar.gif" width="22" height="1"><p>&nbsp;</p></td> 
    </tr> 
    <tr> 
    <td><img src="images/PURPLE_bottom_left.gif" width="22" height="25"></td> 
    <td height="10" background="images/PURPLE_bottom_bar.gif"><p>&nbsp;</p></td>
    <td><img src="images/PURPLE_bottom_right.gif" width="22" height="25"><p>&nbsp;</p></td> 
    </tr> 
    </table>
    Hope that helps,
    Goof

    Edit:


    Hrm, vBulletin seems to have converted my HTML character for space into spaces...just so you know what I'm talking about, a space character is represented by an amperstand followed by nbsp; so use that inside paragraph tags to get that background to show up.
    Last edited by Goof; Jul 1, 2002 at 09:00.
    Nathan Rutman
    A slightly offbeat creative.


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
  •