Re: table not displayed over enitre webform

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • Re: problem upgrading to JSTL 1.2
    ... This is after the upgrade. ... what the underlying Map types are. ... underlying type the way your container seems to be able to. ...
    (comp.lang.java.programmer)
  • Re: table not displayed over enitre webform
    ... the table, and it will fill 100% of it's container, but how high is it's ... the browser does not ... as the definition of the html page will end just after the last contained ... The bottom-border of the table is not at all at the bottom of the page ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Malware Triangle
    ... when it interprets html with embedded executable content. ... but the fact is that html does not have instructions, ... ability to act as a container for non-html content, ... execute the additional content contained within html documents they ...
    (alt.computer.security)
  • Re: Using OverlayLayout
    ... Daniel Pitts wrote: ... I want to achieve a kind of layout, as demonstrated by this HTML page: ... There are two components I wish to put in a container. ... OverlayLayout isn't the right layout manager to use? ...
    (comp.lang.java.gui)
  • Re: Using OverlayLayout
    ... Cameron McCormack wrote: ... I want to achieve a kind of layout, as demonstrated by this HTML page: ... There are two components I wish to put in a container. ...
    (comp.lang.java.gui)