#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    50
    Rep Power
    11

    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 ?
  2. #2
  3. Über nübe
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Babylon 4
    Posts
    240
    Rep Power
    11
    I don't understand your question. You want to put content in the TD that has id="main", right?

IMN logo majestic logo threadwatch logo seochat tools logo