Vertical centering in layers

  • Thread starter Thread starter Helpful person
  • Start date Start date
H

Helpful person

I wish to center text and pictures vertically in a layer. The layer
has a fixed width and height. Is there a way to do this?

(It is easy using tables, hoever I do not wish to use tables.)
 
You need to use a table.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.
 
Kevin said:
You need to use a table.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

I do not wish to use tables as I understand that they generally take
longer to load, but more impotantly will have compatability problems
with new devices such as web phones.
 
Help! I'm chiming in here because I always understood the OPPOSITE to be true
of download times--that simple tables (not nested & not too long) load more
quickly & dependably than layers. But I don't know about phones. So please,
Kevin or somebody, shed some light on this. THANK YOU!
 
Mir said:
Help! I'm chiming in here because I always understood the OPPOSITE to be true
of download times--that simple tables (not nested & not too long) load more
quickly & dependably than layers. But I don't know about phones. So please,
Kevin or somebody, shed some light on this. THANK YOU!

I'm a fairly new (and amateur) web designer, doing it as a necessity
for my business. However, I'v more experience in programming than
most, hence I understand the importance of trying to do things
correctly from the beginning.

I fairly quickily got a reasonable (if not well written) web on line.
I am now rewriting to try to avoid future (and present) compatablity
problems. I have gleaned a small amount of knowledge and readily admit
that I could have some misinformation.

Comments from experienced web designers are welcome.
 
Helpful, you're wise to look to the future as you plan your website. Like
you, I would like to hear from some experienced web designers.
 
Sorry, I've been working. Can't avoid it from time to time. ;-)

First of all, if you want to do vertical centering, you're going to have to
use tables. That's pretty much a fact. It can be done using CSS with a
helping of JavaScript as well, but your concerns about tables don't justify
this measure. JavaScript takes much more processing than HTML tables. In
addition, as far as web phones are concerned, you can't display regular HTML
documents in web phones. Well, I suppose it might be possible, but not
advisable, as the amount of screen real estate in web phones is so small,
you'd have to have almost no content in a web page to display it in a web
phone.

Unless you're designing specifically for web phones, you shouldn't even be
thinking about them. There are all kinds of Internet clients out there. Many
of them are not particularly good for displaying pages designed for
browsers. As far as any religious arguments you may have heard about tables,
you might want to check out what the W3C has to say about tables. They are
part of the HTML standard, and probably always will be.

But I digress. In essence, if you want the simplest, most efficient way to
center content verically, tables is the way to go. Otherwise, assuming that
vertical centering isn't a priority, you're free to use anything you want.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.
 
Kevin said:
You need to use a table.


Could one set the top and bottom padding in the "layer
properties/borders and shading" to finetune vertical alignment of the
text within the layer?

Angela
 
Thanks for the help, Kevin.

Kevin Spencer said:
Sorry, I've been working. Can't avoid it from time to time. ;-)

First of all, if you want to do vertical centering, you're going to have to
use tables. That's pretty much a fact. It can be done using CSS with a
helping of JavaScript as well, but your concerns about tables don't justify
this measure. JavaScript takes much more processing than HTML tables. In
addition, as far as web phones are concerned, you can't display regular HTML
documents in web phones. Well, I suppose it might be possible, but not
advisable, as the amount of screen real estate in web phones is so small,
you'd have to have almost no content in a web page to display it in a web
phone.

Unless you're designing specifically for web phones, you shouldn't even be
thinking about them. There are all kinds of Internet clients out there. Many
of them are not particularly good for displaying pages designed for
browsers. As far as any religious arguments you may have heard about tables,
you might want to check out what the W3C has to say about tables. They are
part of the HTML standard, and probably always will be.

But I digress. In essence, if you want the simplest, most efficient way to
center content verically, tables is the way to go. Otherwise, assuming that
vertical centering isn't a priority, you're free to use anything you want.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.
 
Back
Top