midnite Posted September 27, 2007 Share Posted September 27, 2007 i am sure that my content is not longer than the height of the browser, because it consists of just a few words in a line.And i want my content to be placed in the vertical center of the page.If i skip <DOCTYPE>, i can use <table height="100%"> and <td valign="middle">. But it is not standard.i want to use XHTML 1.1 to achieve this: setting the content in vertical center.Is there a way? Thanks!!ReferenceStandard <DOCTYPE>: http://www.w3.org/QA/2002/04/valid-dtd-list.htmlValidator: http://validator.w3.org/ Link to comment Share on other sites More sharing options...
Err Posted September 27, 2007 Share Posted September 27, 2007 Yeah, there's a XHTML 1.1 valid way. <table style="height:100%;"> <tr> <td style="vertical-align:middle;"><p> </p></td> </tr></table> It's been so long since I have used percentages on heights in CSS, but if I recall correctly, they don't work that well.http://www.w3schools.com/css/pr_dim_height.asphttp://www.w3schools.com/css/pr_pos_vertical-align.asp Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted September 27, 2007 Share Posted September 27, 2007 Be sure that you serve XHTML 1.1 with application/xhtml+xml. Otherwise just use XHTML 1.0 Strict. Link to comment Share on other sites More sharing options...
midnite Posted September 28, 2007 Author Share Posted September 28, 2007 Be sure that you serve XHTML 1.1 with application/xhtml+xml. Otherwise just use XHTML 1.0 Strict.you mean the line <?xml version="1.0" encoding="utf-8"?> ? i have include this at the top of the file. Link to comment Share on other sites More sharing options...
jlhaslip Posted September 29, 2007 Share Posted September 29, 2007 Try this:http://www.jlhaslip.trap17.com/samples/mis...entereddiv.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.