Solved

HML Table to occupy 100% of the page

Posted on 2013-01-13
3
401 Views
Last Modified: 2013-02-03
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
Comment
Question by:TrialUser
3 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 38773217
Just add this to your css    demo

html, body{
  height: 100%;
}
table {height:100%;width:100%;}
0
 
LVL 18

Accepted Solution

by:
Rartemass earned 500 total points
ID: 38773276
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
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38773401
Hi,

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

Hope it helps u...
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pass form variable from one web form to another 2 29
IEnumerable<T> to a List<T> 8 38
REST endpoint query with a parameter 1 18
Google Maps with Webforms 1 13
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

828 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