By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,696 Members | 2,213 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,696 IT Pros & Developers. It's quick & easy.

Height of a table in %

P: n/a
I have simple html(aspx) page, but vertical height won't work.

Even if i had set the height of a table=100%, the table is not 100% height.

I spend a lot of time(my real page is more complicated) to figured it out that this won't work because of attribute of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

I have visual studio 2005 beta2 and it appends this attribute to every page.

How can I get rid of this attribute or how can I set that height of a table in % will work?
Code of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head></head>
<body>
<table border=1 ><tr valign=top><td>
<table height=100% border=1 style="border-color:red">
<tR><td valign=top>
<table >
<tR><td height=5></td></tr>
</table>
<table border=1>
<tR><td>test</td></tr>
</table>
</td></tr>
<tR><td valign=top >
<table border=1 height=100%>
<tR><td>test2</td></tr>
</table>
</td></tr>
</table>
</td>
<td>
<table>
<tR><td>
<table border=1>
<tR><td>test1</td></tr>
<tR><td>test2</td></tr>
<tR><td>test3</td></tr>
<tR><td>test4</td></tr>
<tR><td>test5</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Nov 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
The reason is your outter table is not 100%.
So the inner table is just spanning 100% of the outter table

try:

<table border=1 height="100%"><tr valign=top><td>
<table height=100% border=1 style="border-color:red">

ALso the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> can just be removed off the page after its created, and visual studio won't put it back
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
I have simple html(aspx) page, but vertical height won't work.

Even if i had set the height of a table=100%, the table is not 100% height.

I spend a lot of time(my real page is more complicated) to figured it out that this won't work because of attribute of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

I have visual studio 2005 beta2 and it appends this attribute to every page.

How can I get rid of this attribute or how can I set that height of a table in % will work?
Code of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head></head>
<body>
<table border=1 ><tr valign=top><td>
<table height=100% border=1 style="border-color:red">
<tR><td valign=top>
<table >
<tR><td height=5></td></tr>
</table>
<table border=1>
<tR><td>test</td></tr>
</table>
</td></tr>
<tR><td valign=top >
<table border=1 height=100%>
<tR><td>test2</td></tr>
</table>
</td></tr>
</table>
</td>
<td>
<table>
<tR><td>
<table border=1>
<tR><td>test1</td></tr>
<tR><td>test2</td></tr>
<tR><td>test3</td></tr>
<tR><td>test4</td></tr>
<tR><td>test5</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Nov 19 '05 #2

P: n/a
Thank you for your answer,

but even If outter table is 100% the inner table is not.

Just copy my code into notepad, save it as html file and try.

Any idea?

regards,SImon

"Grant Merwitz" <gr***@workshare.com> wrote in message news:uD**************@TK2MSFTNGP10.phx.gbl...
The reason is your outter table is not 100%.
So the inner table is just spanning 100% of the outter table

try:

<table border=1 height="100%"><tr valign=top><td>
<table height=100% border=1 style="border-color:red">

ALso the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> can just be removed off the page after its created, and visual studio won't put it back
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
I have simple html(aspx) page, but vertical height won't work.

Even if i had set the height of a table=100%, the table is not 100% height.

I spend a lot of time(my real page is more complicated) to figured it out that this won't work because of attribute of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

I have visual studio 2005 beta2 and it appends this attribute to every page.

How can I get rid of this attribute or how can I set that height of a table in % will work?
Code of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head></head>
<body>
<table border=1 ><tr valign=top><td>
<table height=100% border=1 style="border-color:red">
<tR><td valign=top>
<table >
<tR><td height=5></td></tr>
</table>
<table border=1>
<tR><td>test</td></tr>
</table>
</td></tr>
<tR><td valign=top >
<table border=1 height=100%>
<tR><td>test2</td></tr>
</table>
</td></tr>
</table>
</td>
<td>
<table>
<tR><td>
<table border=1>
<tR><td>test1</td></tr>
<tR><td>test2</td></tr>
<tR><td>test3</td></tr>
<tR><td>test4</td></tr>
<tR><td>test5</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Nov 19 '05 #3

P: n/a
Thats strange,
I set the outter table to height 100%, and it did nothing.
I then removed that line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
and it worked perfectly

view attached
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Thank you for your answer,

but even If outter table is 100% the inner table is not.

Just copy my code into notepad, save it as html file and try.

Any idea?

regards,SImon

"Grant Merwitz" <gr***@workshare.com> wrote in message news:uD**************@TK2MSFTNGP10.phx.gbl...
The reason is your outter table is not 100%.
So the inner table is just spanning 100% of the outter table

try:

<table border=1 height="100%"><tr valign=top><td>
<table height=100% border=1 style="border-color:red">

ALso the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> can just be removed off the page after its created, and visual studio won't put it back
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
I have simple html(aspx) page, but vertical height won't work.

Even if i had set the height of a table=100%, the table is not 100% height.

I spend a lot of time(my real page is more complicated) to figured it out that this won't work because of attribute of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

I have visual studio 2005 beta2 and it appends this attribute to every page.

How can I get rid of this attribute or how can I set that height of a table in % will work?
Code of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head></head>
<body>
<table border=1 ><tr valign=top><td>
<table height=100% border=1 style="border-color:red">
<tR><td valign=top>
<table >
<tR><td height=5></td></tr>
</table>
<table border=1>
<tR><td>test</td></tr>
</table>
</td></tr>
<tR><td valign=top >
<table border=1 height=100%>
<tR><td>test2</td></tr>
</table>
</td></tr>
</table>
</td>
<td>
<table>
<tR><td>
<table border=1>
<tR><td>test1</td></tr>
<tR><td>test2</td></tr>
<tR><td>test3</td></tr>
<tR><td>test4</td></tr>
<tR><td>test5</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Nov 19 '05 #4

P: n/a
I know, it's strange.

I'm looking everywhere to find the solution, but I'm stuck.

Does anybody know the solution (without java script)?

thank you,Simon

"Grant Merwitz" <gr***@workshare.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Thats strange,
I set the outter table to height 100%, and it did nothing.
I then removed that line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
and it worked perfectly

view attached
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Thank you for your answer,

but even If outter table is 100% the inner table is not.

Just copy my code into notepad, save it as html file and try.

Any idea?

regards,SImon

"Grant Merwitz" <gr***@workshare.com> wrote in message news:uD**************@TK2MSFTNGP10.phx.gbl...
The reason is your outter table is not 100%.
So the inner table is just spanning 100% of the outter table

try:

<table border=1 height="100%"><tr valign=top><td>
<table height=100% border=1 style="border-color:red">

ALso the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> can just be removed off the page after its created, and visual studio won't put it back
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
I have simple html(aspx) page, but vertical height won't work.

Even if i had set the height of a table=100%, the table is not 100% height.

I spend a lot of time(my real page is more complicated) to figured it out that this won't work because of attribute of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

I have visual studio 2005 beta2 and it appends this attribute to every page.

How can I get rid of this attribute or how can I set that height of a table in % will work?
Code of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head></head>
<body>
<table border=1 ><tr valign=top><td>
<table height=100% border=1 style="border-color:red">
<tR><td valign=top>
<table >
<tR><td height=5></td></tr>
</table>
<table border=1>
<tR><td>test</td></tr>
</table>
</td></tr>
<tR><td valign=top >
<table border=1 height=100%>
<tR><td>test2</td></tr>
</table>
</td></tr>
</table>
</td>
<td>
<table>
<tR><td>
<table border=1>
<tR><td>test1</td></tr>
<tR><td>test2</td></tr>
<tR><td>test3</td></tr>
<tR><td>test4</td></tr>
<tR><td>test5</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Nov 19 '05 #5

P: n/a
I narrowed it down to be particularly the line "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"

Visual Studio 2003 places just:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
at the top of the page, not the DTD reference.

Can you not just remove that line?

Do you need it in there, or does visual studio 2005 keep putting it back?
"simon" <si*********@stud-moderna.si> wrote in message news:uH**************@TK2MSFTNGP12.phx.gbl...
I know, it's strange.

I'm looking everywhere to find the solution, but I'm stuck.

Does anybody know the solution (without java script)?

thank you,Simon

"Grant Merwitz" <gr***@workshare.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Thats strange,
I set the outter table to height 100%, and it did nothing.
I then removed that line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
and it worked perfectly

view attached
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Thank you for your answer,

but even If outter table is 100% the inner table is not.

Just copy my code into notepad, save it as html file and try.

Any idea?

regards,SImon

"Grant Merwitz" <gr***@workshare.com> wrote in message news:uD**************@TK2MSFTNGP10.phx.gbl...
The reason is your outter table is not 100%.
So the inner table is just spanning 100% of the outter table

try:

<table border=1 height="100%"><tr valign=top><td>
<table height=100% border=1 style="border-color:red">

ALso the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> can just be removed off the page after its created, and visual studio won't put it back
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
I have simple html(aspx) page, but vertical height won't work.

Even if i had set the height of a table=100%, the table is not 100% height.

I spend a lot of time(my real page is more complicated) to figured it out that this won't work because of attribute of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

I have visual studio 2005 beta2 and it appends this attribute to every page.

How can I get rid of this attribute or how can I set that height of a table in % will work?
Code of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head></head>
<body>
<table border=1 ><tr valign=top><td>
<table height=100% border=1 style="border-color:red">
<tR><td valign=top>
<table >
<tR><td height=5></td></tr>
</table>
<table border=1>
<tR><td>test</td></tr>
</table>
</td></tr>
<tR><td valign=top >
<table border=1 height=100%>
<tR><td>test2</td></tr>
</table>
</td></tr>
</table>
</td>
<td>
<table>
<tR><td>
<table border=1>
<tR><td>test1</td></tr>
<tR><td>test2</td></tr>
<tR><td>test3</td></tr>
<tR><td>test4</td></tr>
<tR><td>test5</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Nov 19 '05 #6

P: n/a

What does it mean? I guess that it stand there for some purpose and maybe some controls require it?

But I found something interesting:

if you append also the line:
<?xml version="1.0" encoding="iso-8859-1"?>

than it works.

Do you know why?

regards,
Simon
"Grant Merwitz" <gr***@workshare.com> wrote in message news:Oc****************@TK2MSFTNGP09.phx.gbl...
I narrowed it down to be particularly the line "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"

Visual Studio 2003 places just:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
at the top of the page, not the DTD reference.

Can you not just remove that line?

Do you need it in there, or does visual studio 2005 keep putting it back?
"simon" <si*********@stud-moderna.si> wrote in message news:uH**************@TK2MSFTNGP12.phx.gbl...
I know, it's strange.

I'm looking everywhere to find the solution, but I'm stuck.

Does anybody know the solution (without java script)?

thank you,Simon

"Grant Merwitz" <gr***@workshare.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Thats strange,
I set the outter table to height 100%, and it did nothing.
I then removed that line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
and it worked perfectly

view attached
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Thank you for your answer,

but even If outter table is 100% the inner table is not.

Just copy my code into notepad, save it as html file and try.

Any idea?

regards,SImon

"Grant Merwitz" <gr***@workshare.com> wrote in message news:uD**************@TK2MSFTNGP10.phx.gbl...
The reason is your outter table is not 100%.
So the inner table is just spanning 100% of the outter table

try:

<table border=1 height="100%"><tr valign=top><td>
<table height=100% border=1 style="border-color:red">

ALso the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> can just be removed off the page after its created, and visual studio won't put it back
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
I have simple html(aspx) page, but vertical height won't work.

Even if i had set the height of a table=100%, the table is not 100% height.

I spend a lot of time(my real page is more complicated) to figured it out that this won't work because of attribute of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

I have visual studio 2005 beta2 and it appends this attribute to every page.

How can I get rid of this attribute or how can I set that height of a table in % will work?
Code of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head></head>
<body>
<table border=1 ><tr valign=top><td>
<table height=100% border=1 style="border-color:red">
<tR><td valign=top>
<table >
<tR><td height=5></td></tr>
</table>
<table border=1>
<tR><td>test</td></tr>
</table>
</td></tr>
<tR><td valign=top >
<table border=1 height=100%>
<tR><td>test2</td></tr>
</table>
</td></tr>
</table>
</td>
<td>
<table>
<tR><td>
<table border=1>
<tR><td>test1</td></tr>
<tR><td>test2</td></tr>
<tR><td>test3</td></tr>
<tR><td>test4</td></tr>
<tR><td>test5</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Nov 19 '05 #7

P: n/a
What i remember from university

DTD stands for Date Type Definition, and was used with Xml files to standardise it or something.
(hmm, clearly my memory of university didn't stick)

But its probably using that defintion to set some standard in your HTML file (or rather XTHML - extended Html)
But i'm not that well versed in .NET 2.0 yet - so who knows what its trying to do.

Maybe start a new post asking what that line means and the effect it had on your page,
will be interesting to see why
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@tk2msftngp13.phx.gbl...

What does it mean? I guess that it stand there for some purpose and maybe some controls require it?

But I found something interesting:

if you append also the line:
<?xml version="1.0" encoding="iso-8859-1"?>

than it works.

Do you know why?

regards,
Simon
"Grant Merwitz" <gr***@workshare.com> wrote in message news:Oc****************@TK2MSFTNGP09.phx.gbl...
I narrowed it down to be particularly the line "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"

Visual Studio 2003 places just:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
at the top of the page, not the DTD reference.

Can you not just remove that line?

Do you need it in there, or does visual studio 2005 keep putting it back?
"simon" <si*********@stud-moderna.si> wrote in message news:uH**************@TK2MSFTNGP12.phx.gbl...
I know, it's strange.

I'm looking everywhere to find the solution, but I'm stuck.

Does anybody know the solution (without java script)?

thank you,Simon

"Grant Merwitz" <gr***@workshare.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Thats strange,
I set the outter table to height 100%, and it did nothing.
I then removed that line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
and it worked perfectly

view attached
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Thank you for your answer,

but even If outter table is 100% the inner table is not.

Just copy my code into notepad, save it as html file and try.

Any idea?

regards,SImon

"Grant Merwitz" <gr***@workshare.com> wrote in message news:uD**************@TK2MSFTNGP10.phx.gbl...
The reason is your outter table is not 100%.
So the inner table is just spanning 100% of the outter table

try:

<table border=1 height="100%"><tr valign=top><td>
<table height=100% border=1 style="border-color:red">

ALso the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> can just be removed off the page after its created, and visual studio won't put it back
"simon" <si*********@stud-moderna.si> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
I have simple html(aspx) page, but vertical height won't work.

Even if i had set the height of a table=100%, the table is not 100% height.

I spend a lot of time(my real page is more complicated) to figured it out that this won't work because of attribute of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

I have visual studio 2005 beta2 and it appends this attribute to every page.

How can I get rid of this attribute or how can I set that height of a table in % will work?
Code of a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head></head>
<body>
<table border=1 ><tr valign=top><td>
<table height=100% border=1 style="border-color:red">
<tR><td valign=top>
<table >
<tR><td height=5></td></tr>
</table>
<table border=1>
<tR><td>test</td></tr>
</table>
</td></tr>
<tR><td valign=top >
<table border=1 height=100%>
<tR><td>test2</td></tr>
</table>
</td></tr>
</table>
</td>
<td>
<table>
<tR><td>
<table border=1>
<tR><td>test1</td></tr>
<tR><td>test2</td></tr>
<tR><td>test3</td></tr>
<tR><td>test4</td></tr>
<tR><td>test5</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Nov 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.