Solved

HML Table to occupy 100% of the page

Posted on 2013-01-13
3
408 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
[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
3 Comments
 
LVL 53

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

728 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