Re: table not displayed over enitre webform
- From: "Mark Fitzpatrick" <markfitz@xxxxxxxxxx>
- Date: Tue, 22 Jul 2008 08:36:19 -0500
You're missing a few key points with html. You can set the height to 100% on the table, and it will fill 100% of it's container, but how high is it's container? In this case, probably as high as the table. the browser does not work like a word processor, you aren't seeing a page. In fact, if you just have your table, most of what you're seeing is not a page, just unused space as the definition of the html page will end just after the last contained element, ie: your table.
You need to set the HTML, Form, and Body tags to have a height of 100% in order for this to have a chance of working.
<style type="text/css">
html, body, form
{
height:100%;
}
</style>
Some people recommend the HTML and Body elements, but since most ASP.Net pages have a form element as the first HTML tag in the page it's worth setting it's height as well.
You may also want to define a <div> element that's the first element and will help define the size of your page and give you a canvas to work in.
<style type="text/css">
div#maincontent
{
height:100%;
width: 80%;
}
</style>
<div id="maincontent"><table ......></div>
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
"Christian Cambier" <christian.cambier@xxxxxxxxx> wrote in message news:ca9a78c1-433d-47a8-aea5-ebd8eec84c86@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
sorry to post this question about HTML in this group but i didn't find
a HTML newsgroup.
I just want a html-table to fill the entire space of a web-page as
follows
<table border="1" style="width: 100%; vertical-align="top";
height: 100%" cellpadding="0" cellspacing="0">
<tr>
<td>
1 1
</td>
<td>
1 2
</td>
</tr>
<tr>
<td>
2 1
</td>
<td>
2 2
</td>
</tr>
</table>
But he just takes the space of 2 lines.
The bottom-border of the table is not at all at the bottom of the page
no matter what my height says unless I specify the height in pixels
but then the table-size is not changed according to my browser-window
What am I doing wrong?
Does anybody know a html newsgroup?
thank you
Chris
.
- Follow-Ups:
- Re: table not displayed over enitre webform
- From: Christian Cambier
- Re: table not displayed over enitre webform
- References:
- table not displayed over enitre webform
- From: Christian Cambier
- table not displayed over enitre webform
- Prev by Date: Re: radio button vadliator
- Next by Date: Get Edited GridView row?
- Previous by thread: table not displayed over enitre webform
- Next by thread: Re: table not displayed over enitre webform
- Index(es):
Relevant Pages
|