div Wont Vertically Align

Discussion in 'HTML' started by homer, Jan 26, 2005.

  1. homer

    homer Guest

    Cheers,

    Can someone tell me why the text in top right div wont vertically align to
    bottom? CSS vertical-align only works with images in some instances, so I
    put it in the html also, but no luck. I also tried a span tag. It always
    worked in table cells, but why not in div boxes?
    http://wholives.com/temp/css4.html
    Any suggestions?
    Thanks,
    Me
     
    homer, Jan 26, 2005
    #1
    1. Advertising

  2. homer

    Spartanicus Guest

    Spartanicus, Jan 26, 2005
    #2
    1. Advertising

  3. homer

    Steve Pugh Guest

    "homer" <> wrote:

    >Can someone tell me why the text in top right div wont vertically align to
    >bottom?


    Because there's nothing in your CSS that could make it do so.

    > CSS vertical-align only works with images in some instances, so I
    >put it in the html also, but no luck. I also tried a span tag. It always
    >worked in table cells, but why not in div boxes?


    'vertical-align'
    Applies to: inline-level and 'table-cell' elements

    http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align

    >http://wholives.com/temp/css4.html
    >Any suggestions?


    You can make the text appear lower down by setting an appropriate
    margin-top or padding-top to either the <h1> or the containing div. Or
    you can wrap the <h1> and <h2> in another div and absolutely position
    that to the bottom of the containing div.

    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, Jan 26, 2005
    #3
  4. homer

    Richard Guest

    On Wed, 26 Jan 2005 13:43:45 -0600 homer wrote:

    > Cheers,


    > Can someone tell me why the text in top right div wont vertically align
    > to
    > bottom? CSS vertical-align only works with images in some instances,
    > so I
    > put it in the html also, but no luck. I also tried a span tag. It
    > always
    > worked in table cells, but why not in div boxes?
    > http://wholives.com/temp/css4.html
    > Any suggestions?
    > Thanks,
    > Me


    Get rid of the <br> tags at the bottom of the code!
    Define a height for your menu.
    Get rid of the position absolute for the divisions.
    use float:left to position them side by side.
    For positioning a paragraph at the bottom of a cell try this:

    <p style="position:relative; bottom:5px;>
     
    Richard, Jan 27, 2005
    #4
  5. homer

    homer Guest

    > Get rid of the <br> tags at the bottom of the code!
    > Define a height for your menu.
    > Get rid of the position absolute for the divisions.
    > use float:left to position them side by side.




    float:left to position div boxes side by side? It works with two objects
    in one div, but not two divs. I tried nesting the two divs with the float,
    but no luck either.
    http://wholives.com/temp/d.html
    (internal css)
    homer
     
    homer, Jan 27, 2005
    #5
  6. homer

    Anonymous Guest

    "homer" <> wrote in message
    news:...
    > > Get rid of the <br> tags at the bottom of the code!
    > > Define a height for your menu.
    > > Get rid of the position absolute for the divisions.
    > > use float:left to position them side by side.

    >
    >
    >
    > float:left to position div boxes side by side? It works with two

    objects
    > in one div, but not two divs. I tried nesting the two divs with the

    float,
    > but no luck either.
    > http://wholives.com/temp/d.html
    > (internal css)
    > homer
    >


    It's the margin that's causing the problem
     
    Anonymous, Jan 27, 2005
    #6
  7. homer

    homer Guest

    >
    > It's the margin that's causing the problem



    I'll try that: Thanks.............
     
    homer, Jan 28, 2005
    #7
    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. Guybrush Threepwood
    Replies:
    1
    Views:
    494
    Mitja Trampus
    Dec 14, 2005
  2. Replies:
    1
    Views:
    509
  3. Trevor

    CSS Vertically Align Text

    Trevor, Apr 28, 2006, in forum: HTML
    Replies:
    5
    Views:
    9,474
    Barbara de Zoete
    Apr 29, 2006
  4. Steve Richter
    Replies:
    1
    Views:
    933
    Mark Rae
    Jun 24, 2007
  5. Julia B
    Replies:
    5
    Views:
    692
    Julia B
    Jan 30, 2008
Loading...

Share This Page