滚动条没有出现在我的HTML页面中

时间:2018-10-06 10:15:21

标签: css

当页面满后添加元素时,该元素无法显示,因为没有滚动条。

我尝试了overflow:autooverflow:scroll,但是没有用!

我的目标是显示页脚元素,但不显示滚动条。

这是我的样式表代码:

body
{
    background-color:#fae4ef;

}

img {
    width: 200px; height: 150px;

}
div.image {
    float: left;
}
nav {
    float: left;  
}
p.s1{
    margin-left: 15px;
    font-family: 'Arial Nova';
}
#h1style {
    margin-left: 15px;
    font-family:   'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
p.s2{
    margin-left: 475px;
}
p.s3{
    margin-left:15px;
    font-family:  'AGA Arabesque';
}
ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #97cfb6;
    position:absolute;
    top: 125px;    
}

li {
    float: left;
    border-right:1px solid #bbb;
}

li:last-child {
    border-right: none;
}

li a {
    display: block;
    color: black;
    text-align: center;
    padding: 10px 112px;
    text-decoration: none;
    font-family: "Verdana", arial, sans-serif;

}

.active {
    background-color: #fa82b2;
    text-decoration-color:antiquewhite;
    font-weight: bold;
}

1 个答案:

答案 0 :(得分:0)

可能是由于浮动引起的。 但是,如果不看代码结构,确实很难为您提供帮助,这就是为什么看HTML非常重要的原因。

如果您的HTML中有任何机密数据或其他内容,我建议您将其更改为一些虚假数据并共享结构,以便我们提供真正的帮助。 :)