Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html div浮动问题_Html_Css_Wordpress - Fatal编程技术网

Html div浮动问题

Html div浮动问题,html,css,wordpress,Html,Css,Wordpress,好的,我得到了这个div: #content .entry-title { color: #5d9851; font-size: 21px; font-weight: bold; line-height: 1.3em; margin-left: 30px; width: 520px; overflow: hidden; border-bottom: 1px solid #97fb83; } 而且它不会像.grayblock那样位于

好的,我得到了这个div:

#content .entry-title {
    color: #5d9851;
    font-size: 21px;
    font-weight: bold;
    line-height: 1.3em;
    margin-left: 30px;
    width: 520px;
    overflow: hidden;
    border-bottom: 1px solid #97fb83;
}
而且它不会像.grayblock那样位于.stripedbar的一侧。stripedbar会:

.stripedbar{
    background-position:left top;
    background-repeat: repeat;
    background-image:url('images/bar.png');
    height: 20px;
    width: 520px;
    margin-left: 30px;
    margin-bottom: 0px;
}

.grayblock{
    background-color: #cccccc;
    height: 40px;
    width: 20px;
    float: left;
}
你知道如何让它玩得很好吗(在.grayblock旁边,在.stripedbar下面)

这是博客:
添加
清除:无
属性到
标记或
#内容。条目标题
,因为它当前不允许浮动元素移动到任意一侧。

添加
清除:无
属性到
标记或
内容。条目标题
,因为它不允许浮动元素移动到任意一侧当前。

样式表中有以下代码:

h1, h2, h3, h4, h5, h6 {
    clear: both;
    font-weight: normal;
}
因此,
.entry title
块正在清除
.grayblock
的浮动。
您需要添加
清除:无
#内容。条目标题
样式,它会很好地工作。

您的样式表中有以下代码:

h1, h2, h3, h4, h5, h6 {
    clear: both;
    font-weight: normal;
}
因此,
.entry title
块正在清除
.grayblock
的浮动。 您需要添加
清除:无
#内容。条目标题
样式,它会很好地工作