Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background image in tables - Netscape problems 1

Status
Not open for further replies.

eladi

Programmer
Sep 4, 2001
80
AU
hi,

i created the following layout with tables. it is a project that has to be done only with html and css and has to work in browser 4.x (ie + netscape).

now, it works in ie, but in netscape 4.x, there is a problem with the background image in the table. i put another table (that's where the content is going to be) into a cell. netscape now repeats the image as a bg in every cell of the new table, although the bg image is defined in the cell where the whole table is situated (e.g. below!)

dunno if this is clear. the problem is located where it begins with:
<td colspan=&quot;10&quot; height=&quot;310&quot; background=&quot;Images/bg_main_start.jpg&quot;>

here's the whole code.

html>
<head>
<title>Layoutproblem with Netscape</title>
</head>

<body>
<table width=&quot;100%&quot; height=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr height=&quot;*&quot;>
<td colspan=&quot;3&quot; height=&quot;*&quot;> </td>
</tr>
<tr>
<td height=&quot;*&quot; width=&quot;*&quot;> </td>
<td height=&quot;*&quot;>
<div align=&quot;center&quot;>
<table bgcolor=&quot;#e5e4e4&quot; width=&quot;740&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td height=&quot;60&quot; width=&quot;80&quot;> 
<meta name=&quot;author&quot; content=&quot;Adrian Wagner, a-Commerce AG&quot;>
</td>
<td height=&quot;60&quot; width=&quot;80&quot;> </td>
<td height=&quot;60&quot; background=&quot;Images/img_untermenu_p.gif&quot; width=&quot;80&quot;> </td>
<td height=&quot;60&quot; background=&quot;Images/img_untermenu_u.gif&quot; width=&quot;80&quot;> </td>
<td height=&quot;60&quot; background=&quot;Images/img_untermenu_b.gif&quot; width=&quot;80&quot;> </td>
<td height=&quot;60&quot; background=&quot;Images/img_untermenu_l.gif&quot; width=&quot;80&quot;> </td>
<td height=&quot;60&quot; background=&quot;Images/img_untermenu_i.gif&quot; width=&quot;80&quot;> </td>
<td height=&quot;60&quot; background=&quot;Images/img_untermenu_c.gif&quot; width=&quot;80&quot;> </td>
<td height=&quot;60&quot; width=&quot;80&quot;> </td>
<td height=&quot;60&quot; width=&quot;20&quot;> </td>
</tr>
<tr height=&quot;25&quot;>
<td background=&quot;Images/img_menu_start.gif&quot; width=&quot;80&quot;> </td>
<td width=&quot;80&quot;> </td>
<td width=&quot;80&quot;> </td>
<td width=&quot;80&quot;> </td>
<td width=&quot;80&quot;> </td>
<td width=&quot;80&quot;> </td>
<td width=&quot;80&quot;> </td>
<td width=&quot;80&quot;> </td>
<td width=&quot;80&quot;> </td>
<td width=&quot;20&quot;> </td>
</tr>
<tr>
<td colspan=&quot;10&quot; height=&quot;310&quot; background=&quot;Images/bg_main_start.jpg&quot;>
<div align=&quot;center&quot;>
<table width=&quot;725&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td height=&quot;25&quot; valign=&quot;bottom&quot;>
<div align=&quot;right&quot; class=&quot;title&quot;></div>
</td>
<td width=&quot;50&quot;> </td>
</tr>
<tr>
<td height=&quot;250&quot;></td>
<td> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</td>
<td height=&quot;*&quot; width=&quot;*&quot;> </td>
</tr>
<tr height=&quot;*&quot;>
<td colspan=&quot;3&quot; height=&quot;*&quot;> </td>
</tr>
</table>

</body>
</html>

tnx a lot for your help.
adi
 
Hi,

Put a spacer gif as the background of the table inside the TD.

<td colspan=&quot;10&quot; height=&quot;310&quot; background=&quot;Images/bg_main_start.jpg&quot;>
<div align=&quot;center&quot;>
<table width=&quot;725&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; background=&quot;spacer.gif&quot;>
<tr>
<td height=&quot;25&quot; valign=&quot;bottom&quot;>

Should work.

Tom
 
Check out the source code for the &quot;Background tiles with Netscape&quot; on this site:


The last example shown tells you to place the table inside a single cell outer table. Set the background image for the outer table then set the inner table background to &quot;&quot;, nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top