[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1182
  • Last Modified:

table height

In,

<TABLE width="80%" height="90%">

height has no effect in mozilla. any alternatives ?
0
sangeetha
Asked:
sangeetha
1 Solution
 
Diablo84Commented:
try

<TABLE style="width: 80%; height: 90%;">
0
 
wobbledCommented:
Set the height within the <TD> tags.  This will work in Mozilla

<table>
<tr>
<td height="100">
Your text etc
</td>
</tr>
</table>
0
 
seanpowellCommented:
Mozilla assumes the body height is the same as the content height, so 80% has no meaning. You'll need to add this:

<style type="text/css">

html,body { height:100%; }

</style>
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
sangeethaAuthor Commented:
sorry friends..i am not success. Please have a look at this simple example(hight works in IE, not in mozilla):

<html style="background-color: buttonface;">
<body>

<table border="1" width="100%">
<tr>

<td>
 <table border="1" width="40%" height="100%">
  <td> table1 row1 </td>
  <td> table1 row2 </td>
 </table>
</td>

<td>
 <table border="1" width="40%">
  <tr>
    <td> table2 row1 </td>
    <td> table2 row2 </td>
  </tr>
  <tr>
    <td> table3 row below </td>
  </tr>
 </table>
</td>

</tr>
</table>

</body>
</html>

could anyone modify this script and give me a solution for mozilla.
0
 
cLFlaVACommented:
Whenever I create a website, the first image I create is the 1 pixel x 1 pixel transparent gif.

Then, when I want to make a table a certain height, I do this:

<table width="100%"><tr>
<td width="1"><img src="images/transparent.gif" width="1" height="600" border="0" alt=""></td>
<td width="649">
<!-- PLACE CONTENT HERE -->
</td>
</tr></table>

The transparent image will stretch, but since it is transparent, you'll never see it.
0
 
seanpowellCommented:
Please don't use images in that way - it's completely outdated...

>>have a look at this simple example

You haven't included the code from the comment above. Like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title></title>
<style type="text/css">

html,body { height:100%; }
table { height:80%; border:1px solid #000000; }

</style>
</head>
<body>

<table>
      <tr>
            <td>This is the content</td>
      </tr>
</table>

</body>
</html>
0
 
sangeethaAuthor Commented:
sean,

may be i am not following correctly. could you please modify my script (works for IE) so that it works the *same* for Mozilla too.

Thanks.
0
 
seanpowellCommented:
Sure - this is the basic format in your case:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title></title>
<style type="text/css">

html,body
{
      height:100%;
      margin:0;
      padding:0;
}

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

table#main td
{
      height:100%;
}

table#full
{
      height:100%;
      width:40%;
      border:1px solid #000000;
}

table#normal
{
      width:40%;
      border:1px solid #000000;
}

td
{
      padding:0;
}

</style>
</head>
<body>

<table id="main" cellspacing="0">
      <tr>
            <td>
            <table id="full" cellspacing="0">
                  <tr>
                        <td>table1 row1</td>
                        <td>table1 row2</td>
                  </tr>
            </table></td>
            <td>
            <table id="normal" cellspacing="0">
                  <tr>
                        <td>table2 row1</td>
                        <td>table2 row2</td>
                  </tr>
                  <tr>
                        <td>table3 row below</td>
                  </tr>
            </table></td>
      </tr>
</table>

</body>
</html>

Sean
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now