将 wordpress 网站标题与徽标对齐

Align wordpress site title with logo

我的网站标题与徽标不一致 这是它现在的样子:

Wordpess 正在生成以下 html 片段:

<div id="logo" class="clearfix">

    <a href="http://localhost/test/" class="custom-logo-link" rel="home" itemprop="url"><img width="100" height="100" src="http://localhost/test/wp-content/uploads/2016/06/icon.png" class="custom-logo" alt="recette flocon advoine" itemprop="logo"></a>                     
        <h1 class="site-title"><a href="http://localhost/test/" rel="home">test test</a></h1>



        <h2 class="site-description">slogan</h2>

    </div>

我怎样才能得到这样的东西:

#logo{display: table;}
.h1{display: table-cell; vertical-align:middle}

这应该可以,如果不行,试试: 顶部:50%;边距顶部:- half.the.height.of.the.font.size 。 顺便说一句,“http://localhost/test/”这在很多层面上都是错误的。请改用 "index.php / index.html"。

向您的 h1 元素添加以下内容:style="padding-top:20px;" 结果:

<h1 class="site-title" style="padding-top:20px;>

根据需要添加更多填充像素。