Jump to content

Place div at bottom of container div


kurt.santo

Recommended Posts

You can try (the container must be given "position: relative" and a defined height):position: absolute; bottom: 0px;Vetical align wouldn't work anyways, that just tells the browser how to display inline elements compared to the text.

Link to comment
Share on other sites

You can try (the container must be given "position: relative" and a defined height):position: absolute; bottom: 0px;Vetical align wouldn't work anyways, that just tells the browser how to display inline elements compared to the text.
Cheers, works well...Could you just explain again what you meant by the vertical alignment issue? Did not completely get it...Kurt
Link to comment
Share on other sites

when you place an image within a text, usually the image bottom is aligned with the text bottom. This can be changed with the CSS vertical-align.
Vertical align makes only sense when using in context with an adjacent picture then... Good to know, cause I sometimes wondered why the text did not align to vertical middle of a container div. This makes sense now... Shame it cannot be done though. If you do not want to use a fixed height, but still put some text in the middle it seems rather troublesome to achieve that...Kurt
Link to comment
Share on other sites

You can make the text align to the vertical middle of a container but only if the container has a static height. It's like this:<div style="height: 200px; line-height: 200px;">Some text Some text Some text Some text </div>

Link to comment
Share on other sites

You can make the text align to the vertical middle of a container but only if the container has a static height. It's like this:<div style="height: 200px; line-height: 200px;">Some text Some text Some text Some text </div>
will keep in mind to use line-height for that purpose... cheers!kurt
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...