"Richard Barnet" <rbarnet (AT) csaNOSPAMreno (DOT) org> wrote:
Quote:
Is it possible to:
p.vertmid {
vertical-align: middle;
text-align: center;
margin: auto auto auto auto;
}
in order to get some text/a paragraph to be in the middle/center of a div? |
No. vertical-align only applies to table cells (where it aligns
content within the cell) and inline elements (where it aligns content
relative to the baseline of the line box).
Quote:
Or would I have to use a div within a div (because paragraphs are inline and
divs are block)? |
Paragraphs are block elements, not inline elements.
Quote:
In other words, I've got a box (a div with a border, absolutely positioned,
fixed width and height, overflow:auto), and I want some text (a quote that
changes randomly) to always be in the middle/center of the box (centered
left to right, and vertically-centered as well). |
There's some material at
http://www.aspekt1.net/ms/dev/vertical-align.html
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <steve (AT) pugh (DOT) net> <http://steve.pugh.net/>