Align nested div to bottom..

Discussion in 'Web Design and Development' started by Fleetwood Mac, Apr 6, 2008.

  1. Fleetwood Mac macrumors 65816

    Fleetwood Mac

    Joined:
    Apr 27, 2006
    Location:
    Canada
    #1
    How can I align a nested div to the bottom of another?
     
  2. thejadedmonkey macrumors 604

    thejadedmonkey

    Joined:
    May 28, 2005
    Location:
    Pa
    #2
    There's (sadly) no valign for CSS.

    You can use positioning; ie something like
    Code:
    position:relative; bottom:0px;
    or give in some insane margin/padding-top value.

    Also, a quick google search reminded me, you can also do position:relative;top:50%; to put the top of the div box in the middle of its container.
     
  3. Fleetwood Mac thread starter macrumors 65816

    Fleetwood Mac

    Joined:
    Apr 27, 2006
    Location:
    Canada
    #3
    Thanks.. It looks like this is good as its going to get.

    Any other method lead to unresolvable issues with the box model problem in IE. Its been driving me crazy all morning now.
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    Well there is vertical-align, but it only works in specific cases, and generally not when you need it.
     

Share This Page