[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

Background Images in Table Cells

Right.
I know this is a question I should know the answer to, but I don't. So shoot me.

I created a table:

<table width="650" align="left" cellspacing="0" cellpadding="0" border="0" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<tr>
      <td valign="top"><img src="Images/lt_border.gif" width=43 height=61 alt="" border="0"></td>
      <td valign="top"><img src="Images/t_border2.gif" width=414 height=61 alt="" border="0" usemap="#t_border2"><img src="Images/noname.gif" width=150 height=61 alt="" border="0"></td>
      <td valign="top"><img src="Images/rt_border.gif" width=43 height=61 alt="" border="0"></td>
</tr>
<tr>
      <td valign="top" width="43" background="Images/l_border.gif"></td>
      <td valign="top"><img src="Images/main.gif" width=142 height=73 alt="" border="0" usemap="#main">
"One expands his mind and soul through the gateway of the intellect."
<div align="right"><font size="-2">-Morning</font></div>
      <align="left">Welcome to the webspace for the Household of Intellect.<br>
      <br>
      We're not yet a real household, but we are looking for members so that we can become one!<br>
      Please take the time to look us over and decide if you'd like to join. If you are interested, please speak with Gwenyth by e-mailing her at <a href="mailto:gwenythus@aol.com">GwenythUS@aol.com</a>.
<br><br>
This household is dedicated to  pondering the great mysteries of life, contemplating theories, and discussing thoughts with others of a like-minded nature.
<br>
<br>
<cite>Page last updated: October 31, 1999</cite>
</td>
      <td valign="top" width="43" background="Images/r_border.gif"></td>
</tr>
<tr>
<td><img src="Images/lb_border.gif" width=43 height=61 alt="" border="0"></td>
<td><img src="Images/bottom.gif" width=564 height=61 alt="" border="0"></td>
<td><img src="Images/rb_border.gif" width=43 height=61 alt="" border="0"></td></td>
</tr>
</table>

And yes, this works perfectly in IE, of course. But in Netscape, the <td background=""> isn't recognized, so the right and left borders aren't coming out properly.

I'm sure there's a work around for this, just not one I can think of.

Anyone help?

The URL is http://members.aol.com/gwenythus/ if you want to look at it yourself.

Thanks,
Gwen
0
Gwenyth
Asked:
Gwenyth
1 Solution
 
mayhewCommented:
If I remember right, in Netscape the cell will collapse with nothing in it.

And the way around that is to include a non-breaking space in that cell.

So the following line:

<td valign="top" width="43" background="Images/r_border.gif"></td>


....should now look like this:

<td valign="top" width="43" background="Images/r_border.gif">nbsp;</td>

I think that will trick.  Let me know if it doesn't.
0
 
BrigidCommented:
Gah, one more reason for me to hate Netscape. &nbsp;'s drive me up a wall!
0
 
potentCommented:
I think you'll like this answer Gwen:

<head>
        <title>HouseHold of Intellect</title>
<LINK REL="StyleSheet" HREF="styles.css" type="text/css">
<LINK REL="StyleSheet" HREF="styles.css" type="text/css">
</head>

<body bgcolor="#ffffff">
<table width="650" align="left" cellspacing="0" cellpadding="0" border="0" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<tr>
        <td valign="top"><img src="Images/lt_border.gif" width=43 height=61 alt="" border="0"></td>
        <td valign="top"><img src="Images/t_border2.gif" width=414 height=61 alt="" border="0" usemap="#t_border2"><img src="Images/noname.gif" width=150 height=61 alt="" border="0"></td>
        <td valign="top"><img src="Images/rt_border.gif" width=43 height=61 alt="" border="0"></td>
</tr>
<tr>
        <td valign="top" width="43" background="Images/l_border.gif">&nbsp;</td>
        <td valign="top"><img src="Images/main.gif" width=142 height=73 alt="" border="0" usemap="#main" ALIGN="left" VALIGN="top" VSPACE="3" HSPACE="1">
<BR><CENTER>"One expands his mind and soul<BR>through the gateway of the intellect."</CENTER>
<div align="right"><font size="-2">-Morning</font></div>
<P>Welcome to the webspace for the Household of Intellect.<br>
        <br>
        We're not yet a real household, but we are looking for members so that we can become one!<br>
        Please take the time to look us over and decide if you'd like to join. If you are interested, please speak with Gwenyth by e-mailing her at <a href="mailto:gwenythus@aol.com">GwenythUS@aol.com</a>.
<br><br>
This household is dedicated to  pondering the great mysteries of life, contemplating theories, and discussing thoughts with others of a like-minded nature.
<br>
<br>
<cite>Page last updated: October 31, 1999</cite>
</td>
        <td valign="top" width="43" background="Images/r_border.gif">&nbsp;</td>
</tr>

If you compare with your page now, you will see that part of the code has been fixed, which was also causing problems in Netscape (extra TD tag) and I added a bit (Webmaster's License :-) which  you can always take it out if you don't like it.

Please remember that although most Browsers (i.e. any version 4.x or greater) will display a "background=" in a TD, it is not valid code.


Website Rob
----------------
Helping people create
a Potent Website

0
 
GwenythAuthor Commented:
Okay, Potent, I'm rejecting your answer because, to be fair, Mayhew answered first.
And his is the answer I used as well.

Mayhew, please post your answer and I'll accept it.
0
 
mayhewCommented:
Thanks Gwen.

I'm glad that worked for you!  :)
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now