尝试制作一个内容不会相互重叠的网页
我想要一个网页,因此在不同的屏幕分辨率下,网页内容的侧面有一个滚动条,而不是彼此重叠。这就是我的 css 内容
@charset "utf-8";
/* CSS Document */
body {
overflow:auto;
font-weight:light;
font-family:Andale Mono, "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:.875em;
font-weight:lighter;
text-align:center;
}
a:link { /* unvisited link */
color:#000;
text-decoration:none;
}
a:visited { /* visited link */
color:#333;
text-decoration:none;
}
a:hover { /* mouse over link */
color:#C60;
text-decoration:none;
}
div.mainbody {
margin-top:3%;
font-size:1em;
margin-left:auto;
margin-right:auto;
}
div.textbody {
height:100%;
overflow:hidden;
font-size:.875em;
margin-top:1%;
position:absolute;
margin-left:10%;
margin-right:10%;
}
div.arrowleft {
position:absolute;
top:40%;
margin-left:25%;
}
div.arrowright {
position:absolute;
top:40%;
margin-right:30%;
margin-left:70%;
}
div.Footerbar {
background:#ffffff;
border-style:dashed;
border-width:1px;
border-left-style:none;
border-right-style:none;
position:absolute;
bottom:1%;
left:0%;
right:0%;
padding-bottom:;
padding-top:;
font-size:.70em;
font-weight:lighter;
text-align:center;
letter-spacing:.2em;
}
div.footer {
z-index:2;
background:#ffffff;
position:absolute;
bottom:0px;
left:0px;
right:0px;
font-size:9px;
font-weight:lighter;
text-align:center;
letter-spacing:2px;
}
div.ads {
position:absolute;
left:0px;
right:0px;
bottom:4%;
width:728px;
height:100px;
margin:auto;
text-align:center;
}
,当我将其中一个页面置于标准显示器分辨率(1024x768)时,它会导致项目重叠而不是创建搜索栏。请帮助meeee
I want a webpage so in different screen resolutions the webpage contents have a scroll bar on the side instead of overlapping eachother. This is what i have for css
@charset "utf-8";
/* CSS Document */
body {
overflow:auto;
font-weight:light;
font-family:Andale Mono, "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:.875em;
font-weight:lighter;
text-align:center;
}
a:link { /* unvisited link */
color:#000;
text-decoration:none;
}
a:visited { /* visited link */
color:#333;
text-decoration:none;
}
a:hover { /* mouse over link */
color:#C60;
text-decoration:none;
}
div.mainbody {
margin-top:3%;
font-size:1em;
margin-left:auto;
margin-right:auto;
}
div.textbody {
height:100%;
overflow:hidden;
font-size:.875em;
margin-top:1%;
position:absolute;
margin-left:10%;
margin-right:10%;
}
div.arrowleft {
position:absolute;
top:40%;
margin-left:25%;
}
div.arrowright {
position:absolute;
top:40%;
margin-right:30%;
margin-left:70%;
}
div.Footerbar {
background:#ffffff;
border-style:dashed;
border-width:1px;
border-left-style:none;
border-right-style:none;
position:absolute;
bottom:1%;
left:0%;
right:0%;
padding-bottom:;
padding-top:;
font-size:.70em;
font-weight:lighter;
text-align:center;
letter-spacing:.2em;
}
div.footer {
z-index:2;
background:#ffffff;
position:absolute;
bottom:0px;
left:0px;
right:0px;
font-size:9px;
font-weight:lighter;
text-align:center;
letter-spacing:2px;
}
div.ads {
position:absolute;
left:0px;
right:0px;
bottom:4%;
width:728px;
height:100px;
margin:auto;
text-align:center;
}
and when i put one of my pages in a standard monitor resolution (1024x768) It causes items to overlap instead of making a search bar. Please help meeee
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的问题中没有提供太多细节。这是我做的一个 div 不重叠的例子。当您展开窗口内容时,它们将开始水平相邻浮动,当窗口尺寸较小时,它们会垂直下拉。 检查示例http://jsfiddle.net/5zcge/
Not much details given in your question. Here's an example i did where divs do not overlap. As you expand the window contents will start floating horizontally next each other, when window size is smaller, they dropdown vertically. Check example http://jsfiddle.net/5zcge/