为什么我没有滚动条?
16lz
2021-01-22
I'm making a website in HTML, CSS, and PHP and the page goes way beyond the screen but there is no scroll bar provided by the browser (Safari 5.0.6 and Firefox 14.0.1 on Mac). Is it because I included the PHP? But shouldn't that be there before the page is rendered?
我正在制作一个HTML,CSS和PHP的网站,页面超出了屏幕,但浏览器没有提供滚动条(Mac上的Safari 5.0.6和Firefox 14.0.1)。是因为我加入了PHP吗?但是在页面呈现之前不应该存在吗?
Here is a link: test website
这是一个链接:测试网站
My PHP syntax:
我的PHP语法:
<div id="content">
<div class="wrapper">
<div id="home" class="alert">
Welcome to always4free©! To browse the classifieds, you must first either choose a location or have your location detected.
</div>
<?php include "res/pages/categories.php"; ?>
</div>
</div>
</div>
What is going on?
到底是怎么回事?
EDIT: Here is my CSS:
编辑:这是我的CSS:
body {
background-image: url("http://always4free.org/site/images/bg.jpg");
background-size: cover;
font-family: "Mouse Memoirs",sans-serif;
}
.wrapper {
margin: 0 auto;
width: 850px;
}
#header {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
border-bottom: 3px solid green;
box-shadow: 0 2px 10px #888888;
height: 50px;
left: 0;
position: fixed;
top: 0;
width: 100%;
}
#logo {
color: rgba(255, 255, 255, 0.7);
float: left;
font-family: "Wendy One",sans-serif;
font-size: 30px;
line-height: 50px;
width: 250px;
}
#logo a:hover {
color: #FFFFFF;
}
#nav {
float: right;
line-height: 50px;
width: 600px;
}
#nav a:first-child {
margin-left: 0;
}
#nav a:last-child {
margin-right: 0;
}
#nav a:link, #nav a:visited {
color: rgba(255, 255, 255, 0.9);
font-family: "Mouse Memoirs",sans-serif;
letter-spacing: 1px;
margin-left: 10px;
margin-right: 10px;
}
#nav a:hover {
border-bottom: 2px solid #FFFFFF;
color: #FFFFFF;
padding-bottom: 1px;
}
#nav a.detect {
background-color: rgba(255, 255, 255, 0.7);
border: 1px solid rgba(255, 255, 255, 0.4);
border-radius: 2px 2px 2px 2px;
color: rgba(0, 0, 0, 0.7);
padding: 5px;
}
#nav a.detect:hover {
color: #000000;
}
#content {
font-family: "Mouse Memoirs",sans-serif;
letter-spacing: 1px;
margin-top: 70px;
}
.page {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
border: 1px solid green;
color: #FFFFFF;
font-size: 20px;
padding: 10px;
}
.alert {
background: none repeat scroll 0 0 #AD2E1D;
border: 1px solid #911E0F;
color: white;
font-size: 20px;
padding: 10px;
text-align: center;
}
#categories {
margin-top: 20px;
}
#categories h2 {
color: rgba(255, 255, 255, 0.7);
font-family: "Wendy One",sans-serif;
font-size: 26px;
}
#categories a:link, #categories a:visited {
background: none repeat scroll 0 0 white;
color: black;
padding: 3px;
}
#categories .block {
line-height: 35px;
}
4 个解决方案
#1
0
Move your div with id content
outside of your header
div.
将id内容移动到标题div之外的div。
It will solve your problem.
它会解决你的问题。
更多相关文章
- PHP会话变量没有转移到我登录的页面,但是会话ID是
- 刷新php页面而不重载内容?
- 如何通过PHP将HTML页面作为字符串获取?
- thinkphp执行删除操作然后成功success后页面跳转失败问题
- 《细说PHP》第一章 LAMP网站的构建---读书笔记
- 在通过AJAX响应发送的页面上执行javascript函数
- 使用jQuery和ajax更改浏览器地址栏URL,无需重载页面[重复]
- 网站优化之PHPCMS如何开启伪静态
- (phpQuery)对网站产品信息采集代码的优化