Jump to content

table with 100% height in xhtml1 transitional


ehsanshekari

Recommended Posts

when i add the doctype to my html page xhtml1 transitional i can't create a table with 100% height. i know that in this dtd table tag doesn't have height attribute.how can i create a table with 100% height in this dtd?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" dir="rtl"><head><title>Test</title></head><body><table align="center" height="100%" width="100%" border="2"><tr><td><br /></td></body></html>

Link to comment
Share on other sites

Guest FirefoxRocks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" dir="rtl"><head><title>Test</title></head><body><table style="text-align: center; height: 100%; width: 100%" border="2"><tr><td><br /></td></tr></table></body></html>

Use CSS :)

Link to comment
Share on other sites

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" dir="rtl"><head><title>Test</title></head><body><table style="text-align: center; height: 100%; width: 100%" border="2"><tr><td><br /></td></body></html>

Use CSS :)

It doesn't work.
Link to comment
Share on other sites

If the height attribute doesn't work, CSS won't either.I'm pretty sure that in order to make it work, you'll have to assign 100% to the height of the html and body elements with CSS.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...