User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 402,049 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,528 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2957 | Replies: 11
Reply
Join Date: Jun 2008
Posts: 2
Reputation: gutao is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
gutao gutao is offline Offline
Newbie Poster

Re: how to maximize table cell height

  #11  
Jun 23rd, 2008
Hello.. I'm brazilian and my english is not good.. sorry some words..
I registered in the site only to help you.

this is your code bellow.. I just insert the class "myclass". and I dont tested it, but I think its not necessary. try:

<!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=iso-8859-1" />
<title>Untitled Document</title>
</head>
<style>
body{
border: 1px solid red;
}
.myclass {
height: 100%;
}
</style>
<![if IE]>
<style>
.myclass { height: expression(document.body.clientHeight-100); } // the full height size of document minus 50px of top cell and minus 50px of bottom cell.
</style>
<![endif]>
<body>
<table border="1" cellspacing="5" cellpadding="5" style="height:100%; width:100%">
<tr>
<td style="width:100%;height:50px"> row 1 col 1</td>
</tr>
<tr>
<td style="width:100%" class="myclass"> row 2 col 1</td>
</tr>
<tr>
<td style="width:100%;height:50px"> row 3 col 1</td>
</tr>
</table>
</body>
</html>

if browser isnt Internet Explorer, the class "myclass" height ll be: "100%", else the class "myclass" ll be replaced to the code between "<![if IE]>" and "<![endif]>".

I hope I have helped.

bye friend.

Gutao from Brazil
Reply With Quote  
Join Date: Jun 2008
Posts: 2
Reputation: gutao is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
gutao gutao is offline Offline
Newbie Poster

Re: how to maximize table cell height

  #12  
Jun 23rd, 2008
hello.. sorry my mistake... I tested now:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<style>
.myclass {
height: 100%;
}
</style>
<![if IE]>
<style>
.myclass { height: expression(document.body.clientHeight-100) + "px"; } // the full height size of document minus 50px of top cell and minus 50px of bottom cell. (excuse my mistake. I forgot in the last code to add " + 'px'"
</style>
<![endif]>
<body>
<table border="1" cellspacing="5" cellpadding="5" width="100%" height="100%">
<tr>
<td style="width: 100px; height: 50px"> row 1 col 1</td>
</tr>
<tr>
<td style="width: 100px" class="myclass"> row 2 col 1</td>
</tr>
<tr>
<td style="width: 100px; height: 50px" height="50px"> row 3 col 1</td>
</tr>
</table>
</body>
</html>
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:43 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC