我试图在基于Arras的Wordpress子主题中的默认主题旁边添加第二个标题图像。现在,仅出现第一个图像,即左侧图像。在右边,只有空白。我想知道我在做什么错-是我的标记错误还是主题本身的约束。

现在是这样的:http://traycezpr.currentecalamo.org/

#header {
    height:165px;
    width:960px;
    margin: 0 auto;
    position: relative;
    background:transparent;
    border:none;
}

#header h1 {
    display:block;
    float:left;
    width:800px;
    height:165px;
background:url(http://traycezpr.currentecalamo.org/wp-content/uploads/2013/01/TZLTER.jpg) no-repeat 0 0;
    background-size: 800px; 165px;
    text-indent:-10000px;
}

#header h2 {
    display:inline;
    float:right;
    position:relative;
    width:160px;
    height:165px:
    text-indent:-10000px;   background:url(http://traycezpr.currentecalamo.org/wp-content/uploads/2013/01/TZCH7.jpg) no-repeat 0 0;
    background-size:160px; 165px;
}

最佳答案

user.css第22行的代码不正确。内容为:

height:165px: text-indent:-10000px


而应改为:

height:165px;
text-indent:-10000px;


您还将.logo(嵌套了h标记的)设置为:

max-width:590px


您应该在整个宽度上都具有此跨度,例如:

width:100%


我还建议您为图像使用实际的divs而不是h标记。 h标签通常用于文本标题/ seo。

关于css - 在Wordpress中并排添加两个标题图像,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14323853/

10-11 22:14
查看更多