0
我正在使用Underscores构建Wordpress主题。 在结构中我有一个宽度为275px的div。在这个div里面我有另一个div,里面有<img>
和<h3>
。当我尝试浮动图像以便h3环绕它时,浮动不会与主题一起工作,但它在单独的html文件中工作。这段代码有什么问题?浮动在下划线中的图像不起作用
.container{
width: 275px;
}
.post-image-small {
float: left;
}
.post-image-small img {
display: block;
box-shadow: 0px 0px 1px 1px #777;
box-sizing: border-box;
border: 1px solid #fff;
float: left;
}
.post-image-small h3.post-title-small {
font-size: .85em;
margin: 0 !important;
}
.post-image-small h3.post-title-small a {
color: #444;
text-decoration: none;
}
.post-image-small h3.post-title-small a:hover {
color: orange;
}
<div class="container">
<div class="post-image-small">
<img src="http://localhost/viewport/wp-content/uploads/2014/09/iwatsh-150x150.jpg" width="50" height="50">
<h3 class="post-title-small"><a href="http://localhost/viewport/?p=1490">Integer non nibh et nibh lacinia tempus</a></h3>
</div>
</div>
预先感谢您
你是什么意思,通过使用Underscores来建立一个Wordp雷斯主题? – ggdx 2014-09-06 21:53:58
在开始WordPress的主题下划线,我用它来建立一个新的主题 – Adam 2014-09-06 21:56:10
如果你在'.post-image-small img'的'float:left;'之后加上'!important',那会起作用吗? – Howli 2014-09-06 22:02:37