play_ Posted June 12, 2007 Share Posted June 12, 2007 How do i do that? i have a div, say 500 x 500, and if i write something, it floats on top left. but how do i put it on the bottom of the div? do i have to wrap the text in yet another div, and absolute position it? Quote Link to comment https://forums.phpfreaks.com/topic/55225-putting-the-text-at-the-bottom-of-the-div/ Share on other sites More sharing options...
Wuhtzu Posted June 12, 2007 Share Posted June 12, 2007 This should do: http://www.w3schools.com/css/pr_pos_vertical-align.asp Quote Link to comment https://forums.phpfreaks.com/topic/55225-putting-the-text-at-the-bottom-of-the-div/#findComment-273077 Share on other sites More sharing options...
Wuhtzu Posted June 12, 2007 Share Posted June 12, 2007 Sorry, forget what I said I made a mistake Quote Link to comment https://forums.phpfreaks.com/topic/55225-putting-the-text-at-the-bottom-of-the-div/#findComment-273079 Share on other sites More sharing options...
play_ Posted June 13, 2007 Author Share Posted June 13, 2007 Yea. vertical-align never seem to have worked for me Quote Link to comment https://forums.phpfreaks.com/topic/55225-putting-the-text-at-the-bottom-of-the-div/#findComment-273604 Share on other sites More sharing options...
Wuhtzu Posted June 13, 2007 Share Posted June 13, 2007 That is because vertical-align is meant to align or justify elements vertically.... you must have encountered some text in some program where you couldn't get lines to be on the "same level", like one was always higher or lower than the other: Something like this which is damn irritating vertical-align is meant to align that kind of stuff... I think relative positioning might work for you: position: relative; bottom: 0; left: 0; Quote Link to comment https://forums.phpfreaks.com/topic/55225-putting-the-text-at-the-bottom-of-the-div/#findComment-273627 Share on other sites More sharing options...
play_ Posted June 13, 2007 Author Share Posted June 13, 2007 Thanks for the explanation. on a sidenote, relative positioning with bottom:0 did not work =/ Quote Link to comment https://forums.phpfreaks.com/topic/55225-putting-the-text-at-the-bottom-of-the-div/#findComment-274209 Share on other sites More sharing options...
bronzemonkey Posted June 13, 2007 Share Posted June 13, 2007 You need to {position:relative} the 500x500 div and then wrap the text in an element which is then given {position:absolute; bottom:0;} Quote Link to comment https://forums.phpfreaks.com/topic/55225-putting-the-text-at-the-bottom-of-the-div/#findComment-274218 Share on other sites More sharing options...
play_ Posted June 14, 2007 Author Share Posted June 14, 2007 Yes bronzemonkey, im afraid that is the only way =/ thanks Quote Link to comment https://forums.phpfreaks.com/topic/55225-putting-the-text-at-the-bottom-of-the-div/#findComment-274617 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.