Solved

table height

Posted on 2004-09-09
8
1,178 Views
Last Modified: 2010-04-09
In,

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

height has no effect in mozilla. any alternatives ?
0
Comment
Question by:sangeetha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 27

Expert Comment

by:Diablo84
ID: 12015680
try

<TABLE style="width: 80%; height: 90%;">
0
 
LVL 17

Expert Comment

by:wobbled
ID: 12015852
Set the height within the <TD> tags.  This will work in Mozilla

<table>
<tr>
<td height="100">
Your text etc
</td>
</tr>
</table>
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 12016000
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
Independent Software Vendors: 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!

 
LVL 2

Author Comment

by:sangeetha
ID: 12016750
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
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12016800
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
 
LVL 31

Accepted Solution

by:
seanpowell earned 25 total points
ID: 12016861
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
 
LVL 2

Author Comment

by:sangeetha
ID: 12017031
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
 
LVL 31

Expert Comment

by:seanpowell
ID: 12017327
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

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question