Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > xhtml question.

Reply
Thread Tools

xhtml question.

 
 
Bern
Guest
Posts: n/a
 
      10-02-2004
hi all,
suppose i have the following XHTML doc.

<!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" lang="en" xml:lang="en">
<head>
<title>Welcome</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>

<body>
<table align="center" width="100%" height="100%">
<tr>
<td valign="middle" align="center">
hello
</td>
</tr>
</table>
</body>
</html>

If the "DOCTYPE" tag is *not* present, the word "hello" will be in the
middle of the page
(because of the "height" attribute in the "table" element)

But in XHTML, the "table" element does not allow "height" attribute, what
should i do in order to display the
word "hello" in the middle of the page? I need a method that is compatible
with transitional XHTML and
also compatible with previous HTML versions.



 
Reply With Quote
 
 
 
 
Toby Inkster
Guest
Posts: n/a
 
      10-02-2004
Bern wrote:

> But in XHTML, the "table" element does not allow "height" attribute, what
> should i do in order to display the
> word "hello" in the middle of the page?


html,body,table { height:100%; }

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
 
 
 
Sam Hughes
Guest
Posts: n/a
 
      10-03-2004
" Bern" <(E-Mail Removed)> wrote in news:415ec9c6$(E-Mail Removed):

> But in XHTML, the "table" element does not allow "height" attribute,


Nor does HTML.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PSD to XHTML Conversion, PSD to HTML, Joomla, Drupal, WordpressConversion, PSD to XHTML CSS xhtml champs XML 0 08-02-2011 05:40 AM
PSD to XHTML Conversion, PSD to HTML, Joomla, Drupal, WordpressConversion, PSD to XHTML CSS xhtml champs C Programming 0 08-01-2011 06:29 AM
convert xhtml to another xhtml using xslt Usha2009 XML 0 12-20-2009 01:13 PM
Should I Convert Site To XHTML or XHTML mobile? chronos3d HTML 9 12-05-2006 04:46 PM
parse URL (href) from xhtml, xhtml -> text, for data hawat.thufir@gmail.com XML 7 02-08-2006 07:39 PM



Advertisments