kurt.santo Posted November 14, 2007 Share Posted November 14, 2007 How do you place a div to the bottom of the container? Cannot use vertical-align "bottom" as other content of container div needs to be at top.Kurt Link to comment Share on other sites More sharing options...
Ingolme Posted November 14, 2007 Share Posted November 14, 2007 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 More sharing options...
kurt.santo Posted November 14, 2007 Author Share Posted November 14, 2007 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 More sharing options...
Ingolme Posted November 14, 2007 Share Posted November 14, 2007 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. Link to comment Share on other sites More sharing options...
kurt.santo Posted November 15, 2007 Author Share Posted November 15, 2007 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 More sharing options...
Ingolme Posted November 15, 2007 Share Posted November 15, 2007 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 More sharing options...
kurt.santo Posted November 15, 2007 Author Share Posted November 15, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.