Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

HML Table to occupy 100% of the page

My requirement is for a table to occupy the full size of the page (both width and height). the width works but not the height. Pls see code attached. What am I missing?

<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%">
<head runat="server">
    <title></title>
    <style>
        table {
            border: double;
            width: 100%;
            height:100%
        }              

    </style>
</head>
<body style="height:100%">
    <form id="form1" runat="server">
   

        <table>
            <tr>
                <td> header row</td>
            </tr>
            <tr>
                <td> Footer Row</td>
            </tr>
        </table>
   
   
    </form>
</body>
</html>
0
TrialUser
Asked:
TrialUser
1 Solution
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Just add this to your css    demo

html, body{
  height: 100%;
}
table {height:100%;width:100%;}
0
 
RartemassAuthor, martial arts coach, IT ConsultantCommented:
In your code you are missing the semi colon after the height:100%. That may account for the issue.

    <style>
        table {
            border: double;
            width: 100%;
            height:100%
        }              

    </style>

You should however follow Padas' example and put all style information into a CSS file.
0
 
Roopesh ReddyIT AnalystCommented:
Hi,

Interesting read on setting Table height - http://www.apptools.com/examples/tableheight.php

Hope it helps u...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now