Support » Themes and Templates » I can't get vertical-align:middle to work

  • I can’t get the “Something goes here to align vertically in the middle… Any help greatly appreciated.

    h2.banner a{
    	font-family: 'Oswald', Impact, Georgia, Times New Roman;
    	padding:0px 0px 0px 0px;
    	margin: 0px 0px 0px 0px;
    <div class="adblock">
    <img src="xxxxxx.jpg" class="attachment-banner wp-post-image" alt="xxxxxx" title="xxxxxxx" width="100" height="100">	
    <h2 class="banner"><a href="xxxxxxx" title="xxxxxxxx">Something goes here</a></h2>
    <div class="clear"></div>
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Andrew Nevins


    Forum moderator

    That code works for me.
    I’ve tested by adding a red border around the <h2>, then adding line-height to something more noticeable like 100px. The anchor does vertically align in the middle of the <h2>

    Thanks, i’ll have another look at it

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I can't get vertical-align:middle to work’ is closed to new replies.