2014-12-28 35 views
0

我想讓我的菜單欄滾動頁面。有人可以幫我弄這個嗎? 我不知道該怎麼試,因爲我是新手。 我還有另一個問題:我想禁用我的主頁中的滾動功能。 我試圖使用溢出:隱藏,但沒有奏效。我想讓我的菜單欄滾動頁面

我的html代碼:

<center> 
<img src="logo.jpg" alt="logo" width=900 height=500 id="logo"/> 
</center> 


<div> <table id="navigatie-venster"> 
    <tr> 
     <td> <a href=index.html>Startpagina</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=bestuur.html>Bestuur</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=trainers.html>Trainers</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=disciplines.html>Disciplines</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=waartrainenwij.html>Waar trainen wij</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=uurrooster.html>Uurrooster</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=contact.html>Contact</a> </td> 
    </tr> 

</table> </div> 

<div> <table id="navigatie-vensterr"> 
    <tr> 
     <td> <a href=index.html>Startpagina</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=bestuur.html>Bestuur</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=trainers.html>Trainers</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=disciplines.html>Disciplines</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=waartrainenwij.html>Waar trainen wij</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=uurrooster.html>Uurrooster</a> </td> 
    </tr> 
    <tr> 
     <td> <a href=contact.html>Contact</a> </td> 
    </tr> 

</table> </div> 

<div id="facebook"> 
<a href="https://www.facebook.com/KoninklijkeTurnkringAalst" target="_blank" > <img src="facebook.jpg" alt="facebook" width=100 height=100 > </a> 
</div> 

<div id="kwaliteitslabel"> 
<img src="kwaliteitslabel.jpg" alt="kwaliteitslabel" width=100 height=100 /> 
</div> 

</body> 

我的CSS是:

body{ background: rgba(169,3,41,1); 
background: -moz-linear-gradient(left, rgba(169,3,41,1) 0%, rgba(143,2,34,1) 44%, rgba(109,0,25,1) 100%); 
background: -webkit-gradient(left top, right top, color-stop(0%, rgba(169,3,41,1)), color-stop(44%, rgba(143,2,34,1)), color-stop(100%, rgba(109,0,25,1))); 
background: -webkit-linear-gradient(left, rgba(169,3,41,1) 0%, rgba(143,2,34,1) 44%, rgba(109,0,25,1) 100%); 
background: -o-linear-gradient(left, rgba(169,3,41,1) 0%, rgba(143,2,34,1) 44%, rgba(109,0,25,1) 100%); 
background: -ms-linear-gradient(left, rgba(169,3,41,1) 0%, rgba(143,2,34,1) 44%, rgba(109,0,25,1) 100%); 
background: linear-gradient(to right, rgba(169,3,41,1) 0%, rgba(143,2,34,1) 44%, rgba(109,0,25,1) 100%); 
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a90329', endColorstr='#6d0019', GradientType=1);} 

#navigatie-venster {position: absolute; 
left: 0px; top: 150px; }  

#navigatie-vensterr{ position: absolute; 
right: 0px; top: 150px; direction: rtl; } 
+0

創建js小提琴。 – mybirthname

+1

P.S:'

'標籤已棄用。 –

+0

這就是我們從您發佈的代碼中可以看到的所有信息:http://jsbin.com/hujaqe/1/edit?html,css,output相信我,很難想象您要做什麼。 –

回答

0

多德檢查這個代碼在這裏

http://jsfiddle.net/naveenkumarpg/bepnus8u/

希望這是你所期待

<div id="fixedheader"> 
    <img src="logo.jpg" alt="logo" width=900 height=500 id="logo" /> 
</div> 

我已修改您的標題與div 和更新的CSS以及。

在HTML中有一些問題,我也修復了它們。

此處的CSS:

#fixedheader { 
    position:fixed; 
    top:0px; 
    left:0px; 
    width:100%; 
    float:left: display:block; 
    text-align:center; 
    background:#fff; 
} 

希望這是你想要的。

乾杯

+0

這是行不通的!但我的背部「徽標」和背景已經改變 – peyman200

+0

你只是想提到「固定頭」的高度,就像你想要多少,那麼你很好走。 –

+0

我剛加入: position:fixed; display:block; 它的工作原理! thx人 – peyman200

相關問題