0

我在关闭容器时遇到问题,所以在我将此标记作为标题后,我想在下面添加其他项目,但不是容器的一部分 - 如果这有意义的话。我不知道为什么不,但是这个 CSS 没有关闭,它基本上只是将它下面的所有内容都作为同一个 CSS 的一部分



CSS:

.menuButton {
    background-color: #8dd1c5;
    width: 252px;
    height: 52px;
    position: absolute;
    left: 0;
    top: 198px;
    z-index: 1000;
    display: block;
    margin-left: -30px;
    margin-top: 17px;
    text-decoration: none;
}

user agent stylesheeta:-webkit-any-link {
    color: -webkit-link;
    text-decoration: underline;
    cursor: auto;
}

.menuContainer .menuWrap {
    width: 222px;
    height: 100%;
    overflow: hidden;
    position: relative;
    -moz-box-shadow: 2px 0 5px 0 rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 2px 0 5px 0 rgba(0, 0, 0, 0.5);
    box-shadow: 2px 0 5px 0 rgba(0, 0, 0, 0.5);
}

#pusher {
    width: 100%;
    position: absolute;
}

.pagesContainer .pageContainer {
    display: block;
    position: absolute;
    height: auto;
    bottom: 0;
    top: 0;
    left: 0;
    overflow: hidden;
    min-width: 770px;
    min-height: 570px;
}

.pagesContainer .pageContainer .pageBackgroundContainer {
    display: block;
    position: absolute;
    height: auto;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    padding: 30px;
    overflow: hidden;
}

.hiddenPageButton, .hiddenMenuButton {
    top: 228px;
    display: none;
    width: auto;
    margin-left: 0;
    padding-left: 20px;
}

.pagesContainer .pageContainer .topBorderText,
.pagesContainer .pageContainer .bottomBorderText {
    position: absolute;
    margin: 0 auto;
    display: block;
    top: 0;
    left: 50%;
    width: 600px;
    margin-left: -300px;
    z-index: 2000;
}

.pagesContainer .pageContainer .bottomBorderText {
    bottom: 0;
    top: auto;
}

.pagesContainer .pageContainer {
    display: block;
    position: absolute;
    height: auto;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    min-width: 770px;
    min-height: 570px;
}

html {
    position: relative;
    height: 100%;
    min-width: 1600px;
    min-height: 570px;
}

.menuContainer {
    min-height: 510px;
    width: 222px;
    position: fixed;
    top: 0;
    bottom: 0;
    height: auto;
    z-index: 3000;
    -webkit-perspective: 1000;
    -webkit-backface-visibility: hidden;
}

的HTML:

http://pastebin.com/raw.php?i=g0STLR3u

问题是容器占据了整个页面我只是希望它占据顶部标题部分。

请帮忙!

4

2 回答 2

0

请添加 right:0 和 top:0

标签

<h2>
 <b style="position: absolute; right: 0px; top: 0px;">
   EXPRESSION ON TUMBLR
  </b>
</h2>
于 2013-08-03T12:15:03.173 回答
0

我想你想创建这样的Fiddle Link菜单

我已经使用过<ul><li>对于他们来说,检查一下:

HTML:

<div class="menuButton">
    <ul>
        <li>Navigation</li>
        <li>Home</li>
        <li>About</li>
        <li>Contact</li>
        <li>Credit</li>
    </ul>
</div>

CSS:

.menuButton ul li{
    display: inline;
    list-style-type: none;
    padding-left: 20px;
}
.menuButton {
    background-color: #8dd1c5;
    width: 500px;
    height: 52px;
    position: absolute;
    left: 0;
    top: 198px;
    z-index: 1000;
    display: block;
    margin-left: -30px;
    margin-top: 17px;
    text-decoration: none;
}

编辑:

改为min-height: 570px如下min-height: 100%

.pagesContainer .pageContainer {
    display: block;
    position: absolute;
    height: auto;
    bottom: 0;
    top: 0;
    left: 0;
    overflow: hidden;
    min-width: 770px;
    min-height: 100%;
}
于 2013-08-03T13:00:54.410 回答