html - 下 zipper 接消失在网页正文后面

标签 html css drop-down-menu menu hyperlink

我有一个用于“服务”链接的下拉菜单,但是当我尝试创建链接时(我知道颜色和内容已关闭,稍后我会修复它们),它消失在页。帮助!

这是CSS:

    body {

    margin: 0 13% 0 13%;
    padding:0;
    border:0;           /* This removes the border around the viewport in old versions of IE */
    width:100%;
    background-image:url('bg.jpg');
    background-size: 100% auto;
    background-attachment:fixed;
    background-repeat: no-repeat;
    min-width: 600px;
    max-width: 1200px;
    font-size:90%;
}

h1, h2, h3 {
    margin:.8em 0 .2em 0;
    padding:0;
}

p {
    margin:.4em 0 .8em 0;
    padding:0;
}

img {
    margin:10px 0 5px;
}

#ads img {
    display:block;
    padding-top:10px;
}

/* Header styles */
#header {
    clear:both;
    float:left;
    width:80%;
}

#header {
    border-bottom:1px solid #000;
}

#header p,
#header h1,
#header h2 {
    padding:.4em 15px 0 15px;
    margin:0;
}

#header a {
    color:#E47AFF;
}

#header a:hover {
    color:#fff;
    background:#E47AFF;
    text-decoration:none;
}

#header ul {
    color: #FFFFFF;
    float: right;
    margin: 0 10% 0% 0%;
    background: #E47AFF;
    padding: 5px;
    border-radius: 10px;
    list-style: none;
    position: relative;
    display: inline-table;
    overflow: visible;
}

#header ul li {
    float: left;
}

#header ul li:hover {
    background: #000;
    color: #E47AFF;
    position: relative;
}

#header ul li:active {
    background: #FFFFFF;
}

#header ul li a {
    display: block;
    text-decoration: none;
    color: #ffffff;
    padding: 5px 20px;
    display: inline;
}

#header ul:after {
    content: "";
    clear: both;
    display: block;
}

#header ul ul {
    display:none;
}

#header ul li:hover > ul {
    display: block;
    float: left;
}

#header ul ul {
    background: #E47AFF;
    border-radius: 10px;
    padding: 5px;
    position: absolute;
    top: 100%;
}

#header ul ul li {
    float: none;
    position: relative;
    top: 100%;
    width: 125px;
}

#header ul ul li a {
    padding: 5px 15px;
    color: white;
    width: 100px;
}

#links {
    margin: 0 10% 0 10%;
}

/* 'widths' sub menu */
#layoutdims {
    clear:both;
    background:#eee;
    border-top:4px solid #000;
    margin:0;
    padding:6px 15px !important;
    text-align:right;
}

/* column container */
.colmask {
    position:relative;  /* This fixes the IE7 overflow hidden bug */
    clear:both;
    float:left;
    width:80%;          /* width of whole page */
    overflow:hidden;        /* This chops off any overhanging divs */
}

/* common column settings */
.colright,
.colmid,
.colleft {
    float:left;
    width:89%;
    position:relative;
}

.col1,
.col2,
.col3 {
    float:left;
    position:relative;
    padding:0 0 1em 0;
    overflow:hidden;
}

/* 2 Column (right menu) settings */
.rightmenu {
    background:#eee;        /* right column background colour */
}

.rightmenu .colleft {
    right:20%;          /* right column width */
    background:#fff;        /* left column background colour */
}

.rightmenu .col1 {
    width:74%;          /* left column content width (left column width minus left and right padding) */
    left:26%;           /* (right column width) plus (left column left padding) */
}

.rightmenu .col2 {
    width:25%;          /* right column content width (right column width minus left and right padding) */
    left:31%;           /* (right column width) plus (left column left and right padding) plus (right column left padding) */
}

/* Footer styles */
#footer {
    clear:both;
    float:left;
    width:80%;
    border-top:1px solid #000;
}

#footer p {
    padding:0 7% 0 7%;
    margin:0;
}

这是 HTML:

<!DOCTYPE html>
<html>
<head>
    <title>Website.</title>
    <link rel="stylesheet" type="text/css" href="screen.css" media="screen" />
</head>
<body>
<div id="page_wrap">
<div id="header">
    <center><img src="berta.jpg"></center>

<div id="links">
    <ul>
        <li><a href="index.html">Home</a></li>
        <li><a href="index.html">About</a></li>
        <li><a href="index.html">Background</a></li>
        <li><a href="index.html">Services</a>
            <ul>
                <li><a href="index.html">Example</a></li>
            </ul>   
        </li>
        <li><a href="index.html">Other</a></li>
        <li><a href="index.html">Contact</a></li>
        <li><a href="index.html">Disclaimer</a></li>
    </ul>
</div>

</div>

    <!-- <marquee bgcolor="#cccccc" loop="-1" scrollamount="5" width="100%">Welcome to the webpage of Berta Kay Celtic Reader.</marquee> -->
<div class="colmask rightmenu">
    <div class="colleft">
        <div class="col1">
            <!-- Column 1 start -->
            This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. This is where your content will go. 

            <!-- Column 1 end -->
        </div>
        <div class="col2">
            <!-- Column 2 start -->
            <center><IMG src="roberta.jpg" width="200px"><br>
            Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here. Any sidebar content will go here.
            <!-- Column 2 end -->
        </div>
    </div>
</div>
<div id="footer">
    <p>This page uses the <a href="http://matthewjamestaylor.com/blog/perfect-2-column-right-menu.htm">Perfect 'Right Menu' 2 Column Liquid Layout</a> by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a>. View more <a href="http://matthewjamestaylor.com/blog/-website-layouts">website layouts</a> and <a href="http://matthewjamestaylor.com/blog/-web-design">web design articles</a>.</p>
</div>
</div>
</body>
</html>

请帮忙!

最佳答案

CSS

#d
{
z-index:100;
}    

列表代码

<ul id='d'>
<li><a href="index.html">Example</a></li>
</ul>

body 中的所有元素都带有 z-index:0 如果我们手动设置 z-index 具有更高 z-index 的元素将在顶部。

关于html - 下 zipper 接消失在网页正文后面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24112871/

相关文章:

javascript - 为所有人在网络上获取 .mov

html - -webkit-转换 : producing jagged lines in Chrome

html - 如何在两列内显示容器?

css - SVG 背景图像悬停时奇怪的过渡行为

html - 如何使用 jQuery 在多个 div 中创建查询选择器?

CSS 目标 IE6 有效

javascript更改多个输入的类onclick

javascript - 如何运行 jquery 下拉菜单打开/关闭

jquery - jQuery滑动抽屉菜单阻止了其他内容

php - 与 mySQL 值链接的下拉列表值问题