Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

68 users online



XHTML Table

XHTML Table

Currently viewing this thread: 1 (0 members and 1 guests)


Page 1 out of 4
demonknight

demonknight

dead
Status: Offline!

XHTML Table

Hey there.

I have just started to work with XHTML recently, and I'm having a problem with using tables. It's just that when I use the vertical alignment (valign) for a <td> tag, it doesn't work. Anybody know why?

Thanks in advance.
- Joey

___________________

luminire.net

MinDFreeZ

MinDFreeZ

Status: Offline!

take it out, add:
style="vertical-align:text-top;"
valign and align, as well as a bunch of other attributes are no longer allowed. (xhtml)

___________________

http://www.enhancedps.com/images/random/crap/sig.gif

Gil

Gil

Semantics Whore
Status: Offline!

The fact that you use a table in xhtml is dubious. Are you sure you're using it to display tabular data such as a table full of numbers or names?

As for the solution to your question: the above way does work, but is not the most advisable way. It's the easiest though. More advisable would be a style sheet, preferably external...

Possible google queries:

"External style sheets css"
"css table"
"xhtml table"

demonknight

demonknight

dead
Status: Offline!

@MinDFreeZ: Your method didn't work. Sad

___________________

luminire.net

freak

freak

Neverside Newbie
Status: Offline!
Quote:

Originally posted by demonknight
@MinDFreeZ: Your method didn't work. Sad


Can we please see your code or can you post a link to an online version of the page?

___________________

Tables for layout is an abuse. -- Internet Explorer is unsafe.

demonknight

demonknight

dead
Status: Offline!

I don't have a page online yet, but I can show you a demo what I'm using...

Code:

<table width="100%" height="100%" border="0">
<tr>
<td width="100%" valign="middle">
<center>blah blah blah</center>
</td>
</tr>
</table>

___________________

luminire.net

SlappyMcCracken

SlappyMcCracken

Status: Offline!

try putting this in your <head>

Code:

<style>
td { vertical-align: top; }
</style>

Ynhockey

Ynhockey

Neverside Newbie
Status: Offline!

vertical-align works only on inline elements.

In any case, it might be because of the height='100%'. Try setting a fixed one and seeing if it changes. If yes, then you're on your own Tongue probably no way to vertical align to center. However, that is the default alignment, so you can just remove the valign or something.

___________________

Learn HTML

Natural_Cause

Natural_Cause

Status: Offline!
Quote:

Originally posted by MinDFreeZ
valign and align, as well as a bunch of other attributes are no longer allowed. (xhtml)

that is not true.

valign is ment for <tr> tag only, align is ment for <td> these two elements have not been removed. dont post false infomation please.

___________________

http://whatpulse.bounceme.net/sig/naturalcause.png

Natural_Cause

Natural_Cause

Status: Offline!
Code:


<table width="100%" height="100%" border="0">
<tr>
<td width="100%" [b]valign="middle"[/b]>
<center>blah blah blah</center>
</td>
</tr>
</table>

WILL NOT WORK

Code:


<table width="100%" height="100%" border="0">
<tr [b]valign="middle"[/b]>
<td width="100%">
<center>blah blah blah</center>
</td>
</tr>
</table>

will work

___________________

http://whatpulse.bounceme.net/sig/naturalcause.png

Page 1 out of 4
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0196 seconds.