niche Posted August 16, 2011 Share Posted August 16, 2011 Deirdre's Dad told me last month that vertical-align works great on one line of text. How do I change this script to vertically (and horizontally) center two lines of text without changing the size of the div? echo '<div style="float:left;width:171px;height:96px;text-align:center;display:table-cell;vertical-align:text-middle;background-color:yellow;">'; echo '<h1 >1/35 Scale House</h1>';echo '</div>'; Link to comment Share on other sites More sharing options...
niche Posted August 16, 2011 Author Share Posted August 16, 2011 This does the trick: echo '<div style="float:left;">'; echo '<h1 style="display:table-cell;vertical-align:middle;width:171px;height:96px;text-align:center;">1/35 Scale Panther</h1>';echo '</div>'; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.