Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 7th, 2005, 12:34 AM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Australia.
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default Cell Height not behaving nicely

Hi All.
Im trying to get my table to strech the full height of the page, which I have done successfully.
BUT... I can not seem to get the cells within the table to conform to their height attributes.
It appears that the middle cell which I hope to be the body of the page will not accept the height="*" attribute.
Is this not accepted?
If I use 100%, It pushes the tables height beyond the page as the other cells have fixed height values.
What is the correct way to do this?
What I want is a table spanning the whole page width and height with three rows, the first is to be say 100px high, the footer is to be say 50px high and the middle cell it to take up the rest.

Any help would be greatly appreciated.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASW Home</title>

    <style type="text/css">
    body{color:#000; background-color: #fff;}
    table{
        border-width: 0;
    }
    html, body{
        height:100%;
        margin: 0;
        padding: 0;
    }
    .FullHeight{
        height:100%;
        margin: 0;
    }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <table class="FullHeight" width="100%" border="1">
            <tr valign="top">
                <td height="100px">
                    Header
                </td>
            </tr>
            <tr valign="top">
                <td height="*">
                    Body
                </td>
            </tr>
            <tr valign="top">
                <td height="50px">
                    Footer
                </td>
            </tr>
        </table>
    </form>
</body>
</html>



======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
Reply With Quote
  #2 (permalink)  
Old March 9th, 2005, 03:36 AM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Australia.
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

The reason for the issue seems to be a difference in ASP.NET 2 to ASP.NET 1.1.
I get the correct result using Visual Studio 2003.
But it does not work in VS 2005 Beta.
It is all html though



======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
Reply With Quote
  #3 (permalink)  
Old February 24th, 2006, 10:43 AM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's a problem with DOCTYPE. Delete it and everything will work fine.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixed table height and row height rajanikrishna HTML Code Clinic 3 January 18th, 2007 12:42 AM
Table Cell Auto Stretching When Height Is Defined rsearing CSS Cascading Style Sheets 5 November 26th, 2006 10:26 AM
Database Connection not Behaving rit01 ASP.NET 2.0 Basics 1 July 7th, 2006 10:55 PM
Access behaving badly mega Classic ASP Databases 6 November 17th, 2003 02:27 PM
Change height of div element if < window height JoelJunstrom Javascript How-To 1 October 10th, 2003 09:14 AM



All times are GMT -4. The time now is 01:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.