Hi Guys,
I have a regular table displayed in aspx file. It has following structure with 2 rows and 3 row split in 2 cells. When I mimic this code in asp.net it doesnt fill the window heightwise even though i have table height=100%. Widthwise it does.
I am fixing the heights of first two rows as shown in the code, with the third row (having 2 td) filling the remaining height. If i paste the same code in classic asp, it works fine.
Unfortunately the article makes sense but it still didnt fix my problem.
I have following doc type....
<!
DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
[:'(] I used style tags and even css sheet, using the article recommendations- but no luck.
I did notice one thing - the table height goes beyond the window height even if i have 100% height attribute.
If the html table is inside the form it follows its height so even you have set the body and html to height 100% it would look like it was not working but actualy it did take height to 100% of its container which is the form. Always include the form when adjusting
the whole page height and width.
Hope this would help you and other people aswell.. ^_^
nimish
Member
343 Points
223 Posts
Table Height problems: ASP.net vs ASP
Sep 23, 2005 02:54 AM|LINK
I have a regular table displayed in aspx file. It has following structure with 2 rows and 3 row split in 2 cells. When I mimic this code in asp.net it doesnt fill the window heightwise even though i have table height=100%. Widthwise it does.
I am fixing the heights of first two rows as shown in the code, with the third row (having 2 td) filling the remaining height. If i paste the same code in classic asp, it works fine.
am i missing anything?
thanks in advance for your help.
<!--
<table border="1" width="100%" id="table1" height="100%">
<tr> <td colspan="2" height=79>Row1</td></tr>
<tr> <td colspan="2" height=27>Row2</td></tr>
<tr>
<td >R3C1</td>
<td>R3C2</td>
</tr>
</table>
-->
JakeJeck
Contributor
4750 Points
950 Posts
Re: Table Height problems: ASP.net vs ASP
Sep 23, 2005 04:48 AM|LINK
I'd read this - http://www.quirksmode.org/css/100percheight.html
nimish
Member
343 Points
223 Posts
Re: Table Height problems: ASP.net vs ASP
Sep 23, 2005 01:08 PM|LINK
Unfortunately the article makes sense but it still didnt fix my problem.
I have following doc type....
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">[:'(] I used style tags and even css sheet, using the article recommendations- but no luck.
I did notice one thing - the table height goes beyond the window height even if i have 100% height attribute.
broeske
Member
25 Points
3 Posts
Re: Table Height problems: ASP.net vs ASP
Sep 23, 2005 01:37 PM|LINK
<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN" >
Rica0625
Member
179 Points
38 Posts
Re: Table Height problems: ASP.net vs ASP
Sep 23, 2005 02:08 PM|LINK
<table border="1" width="100%" id="table1" height="100%" style="table-layout:fixed;">
<tr> <td colspan="2" height=79px>Row1</td></tr>
<tr> <td colspan="2" height=27px>Row2</td></tr>
<tr>
<td >R3C1</td>
<td>R3C2</td>
</tr>
</table>
-->
JakeJeck
Contributor
4750 Points
950 Posts
Re: Table Height problems: ASP.net vs ASP
Sep 23, 2005 04:46 PM|LINK
http://www.w3.org/TR/REC-CSS2/box.html#box-dimensions
nimish
Member
343 Points
223 Posts
Re: Table Height problems: ASP.net vs ASP
Sep 23, 2005 06:13 PM|LINK
Hi Broeske,
I tried your recommendation and it worked!
Thanks to everyone who tried to help me.
nimish
theseizerfac...
Member
2 Points
1 Post
Re: Table Height problems: ASP.net vs ASP
Oct 28, 2010 02:14 PM|LINK
Thanks bro! you rock...
zaqxen
Member
16 Points
4 Posts
Re: Table Height problems: ASP.net vs ASP
Jul 08, 2012 09:17 AM|LINK
OTHER SOLUTION for others
You should also set the "Body", "Html" and, "Form" to 100% height
<style> body, html, #Default { height:100%; } </style>assuming that the ID of your form is "Default"
If the html table is inside the form it follows its height so even you have set the body and html to height 100% it would look like it was not working but actualy it did take height to 100% of its container which is the form. Always include the form when adjusting the whole page height and width.
Hope this would help you and other people aswell.. ^_^
html table height