0

I recently got a Ning account. I want to customize the site a bit more using their "Add Custom CSS" option I would like the ning site to look as close to this site as possible. More specifically the green horizontal bar across the top of the page, and the location and spacing of the header group. I'm currently using the following CSS on the ning site but can't figure out how to make the green horizontal bar span the entire width of the page. Any help, advise or direction would be greatly appreciated.

.mainTab-item.active, .mainTab-item.active > a {
    color: #00a6ed;
}
.site-header {
    height: 0px;
}
.header-container {
    margin-bottom: 15%;
}
h2.module-name {
background-color: #88C540;
    color: #FFFFFF;
    font-size: 16px;
    margin-top: -15%;
    max-width: 100%;
    padding: 30px;
    text-align: center;
    text-shadow: 2px 2px 0px #609F16;
}

Here is the Commonly used CSS classes and HTML (ning.com/ning3help/commonly-used-css-classes-and-html)

4

1 回答 1

1

这里的问题是您的容器的宽度为 960px,其中包含绿色条。因此,当您设置 max-width 或 100% 的宽度时,它是相对于容器而言的。例如 960px 的 100% 是 960px。

解决此问题的唯一方法是更改​​标记并将其从 .container 中取出,以使百分比与文档相关。

或者另一种选择是绝对定位 div 以将其从文档流中取出。但我强烈不建议这样做。

于 2013-09-13T15:31:09.063 回答