div and vertical align

Discussion in 'HTML' started by Tobias Müller, Nov 25, 2003.

  1. Hi,

    doesn't "div" supports vertical align?

    <div class="text">Hello World</div>

    and

    ..text {
    height: 100px;
    vertical-align: bottom;
    }

    doens't work. Any hints?

    Regards from Germany
    Tobias
    Tobias Müller, Nov 25, 2003
    #1
    1. Advertising

  2. Jukka K. Korpela, Nov 25, 2003
    #2
    1. Advertising

  3. Tobias Müller

    Steve Pugh Guest

    "Tobias Müller" <> wrote:

    >doesn't "div" supports vertical align?


    No. Nor does any other block level element. Look it up in the CSS spec
    - http://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align

    "Applies to: inline-level and 'table-cell' elements"

    ><div class="text">Hello World</div>
    >
    >
    >.text {
    > height: 100px;
    > vertical-align: bottom;
    >}
    >
    >doens't work. Any hints?


    Use padding and/or line-height. Or if IE is not required to support
    this part of the presentation use display: table-cell along with
    vertical-align.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Nov 25, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kay
    Replies:
    2
    Views:
    7,146
  2. Jochen Fuhrmann

    vertical-align and div

    Jochen Fuhrmann, Oct 6, 2003, in forum: HTML
    Replies:
    1
    Views:
    24,451
    Steve Pugh
    Oct 6, 2003
  3. Paul Lautman
    Replies:
    6
    Views:
    50,128
    Yucky Korpulent
    Apr 3, 2006
  4. =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=

    [CSS] Div-Tag and Vertical Align

    =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=, Aug 19, 2006, in forum: HTML
    Replies:
    6
    Views:
    22,510
    dorayme
    Aug 22, 2006
  5. Replies:
    3
    Views:
    1,013
    Jonathan N. Little
    Sep 22, 2006
Loading...

Share This Page