Solved

table height

Posted on 2004-09-09
8
1,179 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

688 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