Html滚动条问题

时间:2010-07-10 16:46:15

标签: html css

我正在设计一个相当简单的网站,但由于我没有太多经验,我有一个非常简单的问题。 我已经以一种显示所有必要信息的方式完成了布局,而无需向下滚动。但出于某种原因它就在那里。 该网站的CSS如下:

@charset "utf-8";
/* CSS Document */

html {height:100%;width:100%; margin:0;}

body{

 height:65%;
 font-size:100%;
 font-family:Calibri;
 background-image:url(/images/gradient.png);
 background-repeat:repeat-x;
 background-color:#FFF0;
 color:#00080;
 margin-left:15%;
 margin-top:3%; 
 margin-right:15%;
 width:65%;
}

#banner {
height:40%;
background: url(/images/banner.jpg) right scroll no-repeat;
}

#left_container{
 width:20%;
 height:80%;
}

#left_container img{
 width:100%;
}

a{
 text-decoration:none;
 color:#FFF;
 border:none;
}
#menu{
 width:100%; 
 height:85%;
 font-size:120%;
}

#menu td{
 background:#999;
 color:#FFF; 
 padding:4%;  

}

#menu tr td a:hover{
 background:#CCC;
 color:#333; 
}

#right_container{
 width:75%;
 height:auto;
 position:relative;
 left:+26%;
 top:-80%;
}

#right_container h2{
 font-size:300%;
}

#right_container h3{
 font-size:200%;
}

但是网站看起来像这样(当我在css中设置right_container h2 title(home)大小超过190%时会出现滚动....但我需要它像我设置的那样......或者这将是小的。。如何删除滚动条?

图片 - > http://i29.tinypic.com/hx3uy8.jpg

1 个答案:

答案 0 :(得分:0)

您可以使用Overflow属性控制CSS中滚动条的外观。因此,您可以尝试将overflow: hidden添加到您的BODY CSS声明中,看看是否有帮助。