It might help if you show the source of the start of your table(i.e. the first row)
Main Topics
Browse All TopicsHello,
I'm trying to set the height of the first row in a table to be less than the subsequent rows in the same table.
I'm using <tr style="height:10px;">, but it's not setting it that small (I can set it bigger than the other rows in the table, but not smaller).
What am I doing wrong?
Thanks,
Steve
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You probably cannot reduce the table row's height because its content is too tall.
The default height for a row is the max height of the cells it contains.
Reduce the height of the cells and the row's height should follow.
If that still does not work, reduce the height of the cells' content.
You can also try using a fixed table-layout:
table { table-layout: fixed }
I tried adding style="table-layout:fixed;
<table style="table-layout:fixed;
<tr><td style="height:20px;" colspan="3" bgcolor="maroon" align="center"><font color="#ffffff" face="arial, helvetica, sans-serif" size="1">2005</font></td>
</tr>
<tr bgcolor="#D6DBEB"><td width="60%"><a href="xyz.asp"><font size="1">Change Tools and Techniques: An Introduction to OD Methods </a></td><td><font size="1">New York, NY</font></td>
<td align="center" width="20%"><font color="#000000" face="arial, helvetica, sans-serif" size="1">2/10 – 2/11/05</font></td>
</tr>
What am I doing wrong?
Using the fixed table-layout completely changes the behaviour of tables.
That's why i don't recommend using it except in very special cases (like playing with tables to create charts for example).
Read this for more details: http://www.blooberry.com/i
First thing you need to do is to clean up your code.
Even if you use asp it's possible to generate human readable html (except if you use Frontpage).
Then get rid of the font tags and use CSS with classes instead, it will make your life much easier.
You should end up with something lik this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html
<html>
<head>
<!--base href="http://www.archanapa
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Title</title>
<style type="text/css" media="screen">
table.TestTable {
border-color:maroon;
}
table.TestTable td.TopCell {
height:20px;
line-height:20px;
background-color:maroon;
color:white;
text-align:center;
}
table.TestTable td {
background-color:#D6DBEB;
}
</style>
</head>
<body>
<table class="TestTable" cellpadding="3" border="1">
<tr>
<td class="TopCell" colspan="3">2005</td>
</tr>
<tr>
<td style="width:60%;"><a href="xyz.asp">Change Tools and Techniques: An Introduction to OD Methods</a></td>
<td style="width:20%;">New York, NY</td>
<td style="width:20%;">2/10 – 2/11/05</td>
</tr>
</table>
</body>
</html>
I have a very similar issue - but I want a specific table height. How do I keep that top row to 20px after specifying a table height?
In the above example simply replace table.TestTable with:
table.TestTable {
border-color:maroon;
height:200px;
}
Notice in IE after doing this the top row is no longer 20px. It stays 20px in Firefox, but not IE. I want the body to expand to make the entire height 200px - but keep that top row at 20px.
Thanks--
Mike
There's no workaround I know of.
Here is the link to the official standards:
http://www.w3.org/TR/REC-C
All my good browsers behave correctly.
Complain to the browser manufacturer, saying that its product is malfunctioning.
By the way, is IE7 also malfunctioning? If so, you have a case. If the problem only appears in IE6, they'll say all IE6 users should switch to IE7 (which is not better than IE6 by the way). But IE7 has lots of other misbehaviors you could complain about. Unfortunately, I'm afraid you'll only be able to complain as an IE user, not as a web developer. If the browser manufacturer receives enough user complaints, then it might consider the issue more seriously.
IE should be banned from the web until it respects the web standards:
http://www.gtalbot.org/Bro
http://people.opera.com/ho
Business Accounts
Answer for Membership
by: BatalfPosted on 2005-02-06 at 12:26:23ID: 13239863
Are there any content in the table cells?
If they are empty, try to put in a small image of 10x10 pixels or something
<tr>