kurt.santo Posted September 26, 2007 Share Posted September 26, 2007 How do I vertically align text to the middle of adjacent div (containing photo)?The code is as follows... <div id="barCont"><div id="bar"><img src="photosSameSize/property.jpg" alt="" width="150" height="100"/><img src="photosSameSize/property.jpg" alt="" width="150" height="100"/><img src="photosSameSize/property.jpg" alt="" width="150" height="100"/></div> <div id="headline">Heading<br />and some text</div><br class="clearfloat" /></div> Kurt Link to comment Share on other sites More sharing options...
Shonumi Posted September 26, 2007 Share Posted September 26, 2007 You could either make the padding or margins at the top and bottom of the content elements equal to half the height. Don't set them to something solid, make sure it's a percentage. Link to comment Share on other sites More sharing options...
kurt.santo Posted September 27, 2007 Author Share Posted September 27, 2007 You could either make the padding or margins at the top and bottom of the content elements equal to half the height. Don't set them to something solid, make sure it's a percentage.Unfortunately cannot use a percentage. The div next to it has a picture with padding and margin of 0px, so I have to set it to the middle of the picture as such ...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.