Search code examples
csshtmlpositioning

Div positioning


I have a three column layout with a container "three-col"

In the right column I have a "Feature Tile" which is basically a 220px wide placeholder with editable content.

I need the "Feature Tile" To move with the "three-col" container, so if the content expands in height, I need the feature tile to move down with it...

May need Jquery - not sure.

Thanks!

EDIT: I want the feature tile to always be positioned at the bottom. Move = The div will expand in height based on how much content is inserted - no fixed height


Solution

  • Try this:

    .right-column {
        position:relative;
    }
    .featured-tile {
        position:absolute;
        bottom:0;
    }
    

    This will keep .featured-tile at the bottom of .right-column no matter what height it is due to variable content.

    UPDATE: I think I know what you mean, try this instead.

    .three-col {
        position:relative;
    }
    .featured-tile {
        position:absolute;
        bottom:0;
    }
    

    This will keep .featured-tile at the bottom of .three-col

    Demo: http://jsfiddle.net/wesley_murch/4FKhm/4/