2013-08-22 124 views
0

我使用twitter bootstrap爲我的項目,我把側邊欄放在右側,但是當我改變分辨率時,它不會像其他分辨率一樣。在這裏,附上1024和1366分辨率的兩個屏幕截圖,分別是768(1024 x 768和1366 x 768)。還我複製我的CSS代碼。 (主要代碼是很複雜的,所以我不能把它的jsfiddle)Bootstrap,Sidebar沒有響應

.div.panel 
{ 
    display: none; 
    z-index: 3; 
    top: 201px; 
    right: 9%; 
    height: auto; 
} 
.catlogsidepanel 
{ 
    width: 300px; 
    float: right; 
    background: url(../images/bg_sidepannel.png) repeat-y; 
    position: absolute; 
    margin: 0px 0px 0px 400px; 
} 

我用權:9%設定爲右側位置。

1024×768

enter image description here

1366 * 768(這是正確的,我想這在1024的分辨率)

enter image description here

+0

確保在您的css中添加類或標識符。 – janharold

+0

我是新來的CSS和HTML設計,你能告訴我如何做到這一點? –

+0

目前在您的代碼中顯示,您使用一個沒有'。'的類。要麼 '#'。確保添加它。 '.catlogspanel {}' – janharold

回答

0

你缺少class和id標識符爲catlogsidepanel。它應該是.catlogsidepanel#catlogsidepanel

+0

不,我只用CSS,因此沒有jQuery。 –

+0

@shivam pandya你錯過了。或#在你的CSS catlogsidepanel .. –

+0

號我從谷歌瀏覽器的控制檯複製該代碼,所以它需要顯示,但它是全部輸入。 –