
November 10th, 2003, 01:49 PM
|
|
Contributing User
|
|
Join Date: Oct 2003
Posts: 48
Time spent in forums: 5 h 45 m 12 sec
Reputation Power: 5
|
|
|
table height & css
Here is part of my code :
Code:
<table width="640" border="2" cellpadding="0" cellspacing="0" id="mainTable">
<tr>
<td colspan="2" id="logo"></td>
</tr>
<tr>
<td colspan="2" id="menu"><script type='text/javascript' src='menu_var.js'></script>
<script type='text/javascript' src='menu_com.js'></script></td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" id="main">
and here is the css that belongs to the above code :
Code:
#mainTable
{
width: 640px;
height : 100%;
margin-left: auto;
margin-right: auto;
}
#logo
{
background-color:#ffffff;
background-image: url(Images/logo.jpg);
background-attachment: fixed;
background-repeat:no-repeat;
background-position: center center;
width : 640px;
height : 85px;
}
#menu
{
background-color:#fff000;
color : #cccccc;
border-style: none;
height : 15px;
}
Logo.jpg is 640*85 pixels.
Both the logo picture and the height <td> tag (Id=logo) are 85 but the tags is show stretched out. If I remove height : 100%; from the #mainTable the logo <td> tag resumes what seems to be the correct height, why is this happening ?
|