ehsanshekari Posted July 29, 2008 Share Posted July 29, 2008 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 More sharing options...
Guest FirefoxRocks Posted July 29, 2008 Share Posted July 29, 2008 <!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 More sharing options...
ehsanshekari Posted July 29, 2008 Author Share Posted July 29, 2008 <!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 More sharing options...
Ingolme Posted July 29, 2008 Share Posted July 29, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.