天天看點

html div位于底部,css – 将Div放置在另一個DIV下方

我有兩個DIV元素,其中一個具有絕對位置(主DIV的左下角).第二個DIV是隐藏的,隻有通過點選連結才能顯示.

我需要第二個出現在第一個下方.但由于第一個div的位置是絕對的,第二個位置出現在第一個div之上.

my link

//this is absolute positioned

//this only appears after clicking on a link

CSS:

div.wrapper {

width:inherit;

float:left;

bottom:6px;

position:absolute;

padding: 0 0 0 0;

overflow: auto;

}

div.second-div {

padding-top: 2px

}

div.main-div{

background:{colour} url({image}) no-repeat 0 100%;

width:557px;

padding:8px 13px 4px 13px;

min-height:61px;

position:relative;

}

在此先感謝您的幫助.