Getting height from parent div and use vertical alignment

Discussion in 'CSS' started by SaschaCSS, Aug 16, 2007.

  1. #1
    I've been searching all day long for a solution to my problem... Finally I decided to ask you guys... :)

    I attached two images to that post. It's all about the left pane...

    1st image: Shows how it is at the moment: The div.left has not the same height as its parent (pageBorder). The "vertical-align:bottom;" does not work, either.

    2nd image: That's what it should look like. (Navigation: top - sponsor images: bottom - div left height:100%!)

    Here's the code:

    PageBorder:
    #pageBorder {
    	background: #fff;
    	margin: 12px auto;
    	width: 1011px;
    	position: relative;
    	min-height: 100%;
    	height: 98%;
    	height: auto;
    }
    Code (markup):
    Left has just: "width: 174px; float: left;" -> which is not adjustable, due this is a CMS-setting... The only thing I could do is, adding a class and extend it. (e.g. with heigth-parameters, aso...).


    div.left{
            min-height: 100%;
    	height: 98%;
    }
    Code (markup):
    div#sponsorImages {
    	vertical-align: bottom;
    	text-align:center;
    }
    Code (markup):
    Sooo... the result of these CSS-Tags can be seen in image #1. So the height parameter does not expand to the height of its parent (pageBorder). Why is that? I want it to look like in image #2 so that the sponsorImages will always be at the bottom and the navigation at the top.

    Hope you can help me.

    Greetz

    Sascha
     

    Attached Files:

    SaschaCSS, Aug 16, 2007 IP
  2. math20

    math20 Peon

    Messages:
    1,562
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try something like this:

    
    div#sponsorImages {
    	position:absolute;
            bottom:0px;
    	text-align:center;
    }
    
    Code (markup):
    I am not sure if that specific code will work, but it does have to be a position rather than vertical-align.
     
    math20, Aug 18, 2007 IP