Solved

HML Table to occupy 100% of the page

Posted on 2013-01-13
3
410 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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

623 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