HighDots Forums  

Re: vertical-align some text

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: vertical-align some text in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve Pugh
 
Posts: n/a

Default Re: vertical-align some text - 07-09-2003 , 01:23 PM






"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/>


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.