Ben Posted September 9, 2011 Share Posted September 9, 2011 Hi :)How can I make the text touch the top of the DIV?I've got some text inside the pink box and I would like it to touch the top just because it will make aligning much easier. div.information {width:310px;height:420px;padding-right:2px;top:9px;background-color:#FCC;} Link to comment Share on other sites More sharing options...
dsonesuk Posted September 9, 2011 Share Posted September 9, 2011 The line-height, or even top margin will need adjusting of <h4> element. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 9, 2011 Share Posted September 9, 2011 Another option would be to assign overflow:hidden; to .information div then create a inner container and move it up instead, until text aligns to top. div.information { background-color: #FFCCCC; height: 420px; padding-right: 2px; /* top: 9px; removed as it does nothing unless position is used*/ width: 310px;overflow: hidden; /*added by dsonesuk*/} div.information div { margin-top:-8px;} /*added by dsonesuk*/ <div class="information"><div><h4 class="fontface">The Snow Queen</h4><p>Poster and creative mailer to promote a theatre production of The Snow Queen. I deconstructed the story and took the key element of good and evil to design this piece. I used the tree and it's roots to represent good and evil, and the roses as a symbol of love.</p><br><h5 class="fontface">What I did</h5><p>Poster and creative mailer to promote a theatre production of The Snow Queen. I deconstructed the story and took the key element of good and evil to design this piece. I used the tree and it's roots to represent good and evil, and the roses as a symbol of love.</p></div></div> Link to comment Share on other sites More sharing options...
Ben Posted September 9, 2011 Author Share Posted September 9, 2011 That worked perfectly, thanks for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.