【发布时间】:2023-03-06 04:03:01
【问题描述】:
我正在使用 960 网格系统来布局网站。我无法让 nivo-slider 和 h1 标签并排显示,中间有一个排水沟。有问题的两个元素都包含在一个div中,滑块有一个类
grid_7
并且h1有一个grid_5的类
对于我正在使用的 12 列网格,这些加起来为 12。我不明白它们为什么重叠
这是我的scss
@import "compass/reset";
body {
background: url(../img/background.png);
}
#header {
background: green;
margin-bottom: 25px;
}
.slider-wrapper {
margin-bottom: 10px;
}
#navigation {
clear: both;
ul {
li{
list-style: none;
float: left;
margin: 2px;
a {
text-decoration: none;
}
}
}
}
#content-wrapper {
clear: both;
}
【问题讨论】:
-
很难说没有任何 html 和完整的 css(你包括一个可能包含重要类的文件),但在我看来,如果 h1 是 #header 那么你需要给它float:left 或 display:inline-block