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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strange effect with background colour in firefox

Status
Not open for further replies.

petermidi

Technical User
May 24, 2006
20
0
0
GB
Hi there,
This has me baffled and I'd really appreciate some help.
My table is set up to have no borders/margins/padding.
And displays perfectly in IE.
However, as I have some background colour in some cells I can see that when the site resolves in Firefox/netscape, firefox is making the cells seem 'bigger' - in other words the background colour spills around the side of the logo in the same cell.
Is there an easy workaround for this.
Can I tell firefox to leave the cell as it is and not add padding/borders etc?
Thanks so much,
Peter
 
How are you setting the table to
...no borders/margins/padding
?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Thank you for helping with this.

I've stripped down the code for the page to show the issue:
And put the css code below
Thanks so much for having a look!
Peter




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "<html xmlns=" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="css/css.css" rel="stylesheet" type="text/css" media="all" />
<style type="text/css"></style>
</head>
<body>

<div id="container">
<table width="790" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"><img src="images/spacer.gif" width="10" height="8" /></td>
<td width="128">&nbsp;</td>
<td width="258">&nbsp;</td>
<td width="242">&nbsp;</td>
<td width="28"><img src="images/spacer.gif" width="28" height="1" /></td>
<td width="40"><img src="images/spacer.gif" width="40" height="8" /></td>
<td width="8"><img src="images/spacer.gif" width="8" height="1" /></td>
<td width="46"><img src="images/spacer.gif" width="46" height="1" /></td>
<td width="30"><img src="images/spacer.gif" width="30" height="1" /></td>
</tr>
<tr>
<td colspan="4"><img src="images/testimage.jpg" width="638" height="86" /></td>
<td bgcolor="#FFFFFF" border="0">&nbsp;</td>
<td></td>
<td>&nbsp;</td>
<td></td>
<td bgcolor="#FFFFFF">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="7">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td colspan="5">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

</div>
</body>
</html>



AND the css.css


body {
background-color:#666;
padding:0px 0px 0px 0px;
border: 0px;
margin:0px;
font-family: Helvetica, Arial, sans-serif
}


#container {
background-image: url(../images/8a.jpg);
background-position: left top;
padding: 0px 0px 0px 0px;
margin:0px;
position: absolute;
z-index:1;
top: 30px;
left: 10%;
width: 790px;
border: solid 8px #fff
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top