Vertical Alignment

J

Jim Heavey

If I have a table and i want to vertically center the information in a
single cell, How would I do this?

Thanks in advance for your assistance!!!!!!!!!
 
S

Steve R.

Jim Heavey wrote in message ...
If I have a table and i want to vertically center the information in a
single cell, How would I do this?

I use this ...

valign="middle"
 
D

David Dorward

E

Els

Jim said:
If I have a table and i want to vertically center the information in a
single cell, How would I do this?

Thanks in advance for your assistance!!!!!!!!!

eh.. it should by default center vertically already...
 
K

Kris

If I have a table and i want to vertically center the information in a
single cell, How would I do this?

Thanks in advance for your assistance!!!!!!!!!

eh.. it should by default center vertically already...[/QUOTE]

In some browsers. In others it doesn't.
Use CSS vertical-align property on the table cell. If you don't mind to
burn in hell, use the valign attribute on the cell.
 
E

Els

Kris said:
eh.. it should by default center vertically already...

In some browsers. In others it doesn't.[/QUOTE]

Didn't know that. In which browsers it doesn't? (will have
to check my own pages again in those)
Use CSS vertical-align property on the table cell. If you don't mind to
burn in hell, use the valign attribute on the cell.

Well, I would mind, actually, it's just that I feel being
'burned' in alt.html isn't very much like hell ;-)

(but I still use CSS instead, just for my own comfort)
 
J

Jukka K. Korpela

Els said:
Didn't know that. In which browsers it doesn't?

If a table cell is not vertically centered by default, then the browser
violates the HTML 4 specification. I don't know of any such browser.

Oddly enough, HTML 4 does not use SGML to specify the default (the DTD
says just #IMPLIED) but the prose says it very clearly:

"middle: Cell data is centered vertically within the cell. This is the
default value."

http://www.w3.org/TR/html4/struct/tables.html#adef-valign
 
K

Kris

In some browsers. In others it doesn't.

Didn't know that. In which browsers it doesn't? (will have
to check my own pages again in those)[/QUOTE]

I have to apologize for a too quick conclusion. I remember seeing at
least one (old) browser (could have been one of the Netscape 4 family)
that put it at the top of a cell by default. I could have misled myself.

Jukka's reply clears it up, also for me.

However, not that the default would matter much if one would use tables
for what they are made for.

Again, my apologies.
Well, I would mind, actually, it's just that I feel being
'burned' in alt.html isn't very much like hell ;-)

Actually, it was more of a hint to the OP, not you. I know you are a
Bearer Of The Light.
 
K

Kris

Els said:
[snip too many apologies ;-)]

And you have too many smileys in your posts! :p
lol

Didn't see (or read) any LOTR, but it sounds like a term
from there :-D

Now that you mention it, yes. I recall Gandalf the wizard is called
something like that. Are you, like some of my friends, the kind that
refuses to see the movie before reading the book but just doesn't have
the time to start reading? Teehee.
 
E

Els

Kris said:
Els said:
[snip too many apologies ;-)]

And you have too many smileys in your posts! :p

I noticed... :-( ;-) :-D
Now that you mention it, yes. I recall Gandalf the wizard is called
something like that. Are you, like some of my friends, the kind that
refuses to see the movie before reading the book but just doesn't have
the time to start reading? Teehee.

No, it's not that, more like I don't think I will like the
book/story/film enough to make an effort at sitting down to
read/see it...

Saw Finding Nemo last Saturday though.
My excuse: two little kids. (no smiley here)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top