2010-07-10 57 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