2016-11-23 56 views
-1

我的頁面左側有一個垂直菜單欄,當我嘗試在頁面中間放置一個簡單的 DIV或TABLE時,它會在底部我的側面菜單。垂直菜單欄後無法正確放置div

這裏是酒吧的CSS通用代碼:

.generalMenuHome 
{ 
    width:70px; 
    height:100vh; 
    background-color:#000; 
    border-right:solid 2px #556CF0; 
    min-height: 550px; 
    position:relative; 
} 

我有這裏吧中的一個例子裏面更多的DIV:

.logoInGenrealMenu 
{ 
    position:absolute; 
    width:70px; 
    height:70px; 
    background-image:url(../insiteincludes/medias/logo.png); 
    background-size:80%; 
    background-position:center center; 
    background-repeat:no-repeat; 
} 

我使用位置屬性很好,對嗎?

你可以看到我的問題:https://postimg.org/image/qzju2dl8h/

Capture

謝謝您的時間

+0

你也可以發佈你正在使用的HTML嗎? – Fencer04

+2

尋求代碼幫助的問題必須包括在問題本身中重現**所需的最短代碼**最好在[** Stack Snippet **]中(https://blog.stackoverflow.com/2014/09/introducing-可運行的JavaScript-CSS-和HTML的代碼段/)。請參閱[**如何創建最小,完整和可驗證的示例**](http://stackoverflow.com/help/mcve) –

回答

0

只需要在位置屬性更改爲固定,對於豎線。

.generalMenuHome 
{ 
    position:fixed; 
}