niche Posted April 3, 2012 Share Posted April 3, 2012 Why isn't this aligning vertically? <?phpecho '<div style="float:left;width:60px;height:60px;vertical-align:middle;background-color:blue;">';echo '<p style="vertical-align:middle;margin:0px;text-align:center;overflow:auto;font-weight:bold;font-size:16px;">Save 6.24</p>';echo '</div>'; //closes headline div?> in-line css for question convenience. Link to comment Share on other sites More sharing options...
eTianbun Posted April 4, 2012 Share Posted April 4, 2012 Vertical-align property, is ment for inline elements, just like text-align property, is ment for inline elements too.EX: <img src='image.gif' style='vertical-align:middle'/> If you want you® code to work, you must add: display:inline-block; or display:table-cell; Link to comment Share on other sites More sharing options...
niche Posted April 5, 2012 Author Share Posted April 5, 2012 I missed that. Thanks for your help ET. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.