Table elements

  • Thread starter Thread starter santel
  • Start date Start date
S

santel

Hi All,

I have two tables one inside the other. Just like

<table height="100" id="outerTable">
<tr>
<td>
<table id="innerTable">
<tr><td>News</td></tr>
</table>
</td>
</tr>
</table>

What I need is, I want the inner table height should be the same as
outertable. But I won't specify the height directly in the innertable.
I tried with height="100%". But it is not working. Anyone can suggest
me plz.
 
barring padding and margins, the above should work.

The following looks okay to me:

<html>
<head>
<style type="text/css">

table
{
border: 1px solid #F00;
border-collapse: collapse;
}

#outerTable td
{
padding: 0;
}

#innerTable
{
height: 100%;
margin: 0;
}
</style>
</head>

<body>
<table height="100" id="outerTable">
<tr>
<td>
<table id="innerTable">
<tr><td>News</td></tr>
</table>
</td>
</tr>
</table>
</body>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top