2010-07-10 76 views
0

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

 
@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超过190%越大right_container H2标题(家)规模出现滚动....但我需要它,因为我设置了...或者它会变小)。我可以如何删除滚动条?

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

回答

0

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

+1

只是一个小问题,它被称为'body'规则而不是声明。 'overflow:hidden;'是声明。 – melhosseiny 2010-07-10 17:07:03

+0

正式注意 - 谢谢! – 2010-07-10 17:11:56

+0

完美地工作...... thx这么多的帮助 – 2010-07-10 17:33:32