Solved

table height

Posted on 2004-09-09
8
1,172 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
8 Comments
 
LVL 27

Expert Comment

by:Diablo84
Comment Utility
try

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

Expert Comment

by:wobbled
Comment Utility
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
Comment Utility
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
 
LVL 2

Author Comment

by:sangeetha
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 13

Expert Comment

by:cLFlaVA
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now