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

row height problem

Status
Not open for further replies.

davikokar

Technical User
May 13, 2004
523
IT
hallo,
i have a table that is 100% height. I would like some of the row of this table to be of fixed height, for example 25px. Is there a way to reach this? thanks
 

Yes - add a height declaration to the row, or one of the cells in the row (I think the method might differ depending on the version of the HTML DTD you are working against). You might even use CSS to do this.

IHMO, specifying a percentage height for tables is always flaky... And specifying heights for rows / cells inside the table always overrides this, I believe.

Hope this helps,
Dan
 
billy,

i tried to set a fixed height in px, but the rows still behave like if they were percentage. In NN7 it works fine but in IE it only works in quirk mode. I'm wondering why.

here is the code:
Code:
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html>
<head>
<title>City 2020 - Towards sustainable cities</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />



<style>


html,body {height:100%;}

body {font-family:arial;
      color:#000000;
      margin:0px;
      font-size:75%;}

table    {padding:0px;
          border-spacing:0px;
          border-collapse:collapse;
          border-width:0px;
          border: 1px #000000 solid;}

table td {padding:0px;
          border-spacing:0px;
          border-collapse:collapse;
          border-width:0px;
          border: 1px #000000 solid;}

table#first {height:100%;
             width:100%;}

td.col_outerleft {width:14px;}
td.col_innerleft {width:200px;}
td.col_innerright {width:183px;}
td.col_middle {width:36%;}
td.col_outerright {background-color:#a2b4d7;}

tr.row_bar {height:26px;
             background-color:#e9e9e9;}

tr.row_credits {height:75px;}

tr.row_top {height:113px;}
</style>
</head>
<body>
<table id="first">
  <tr class="row_top">
    <td class="col_outerleft"></td>
    <td class="col_innerleft"></td>
    <td class="col_middle"></td>
    <td class="col_innerright"></td>
    <td class="col_outerright"></td>
  </tr>
  <tr class="row_bar">
    <td class="bar"></td>
    <td class="bar"></td>
    <td class="bar"></td>
    <td class="bar"></td>
    <td class="bar"></td>
  </tr>
  <tr class="row_middle">
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr class="row_credits">
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
</table>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top