2
我試圖讓兩個div在頁面底部粘在一起使用position:fixed。問題是,當我在#feedbackTab上填充填充時,它會從頁面底部向我想要的地方重複#feedbackTab。如何將#feedbackTab放在#feedbackBody之上,並將它們固定在頁面的底部?位置固定填充
#feedbackTab {
background-image:url(../img/feedback_12.png);
position:fixed;
bottom:0px;
padding-bottom:300px;
margin:0;
width:960px;
height:34px;
}
#feedbackBody {
background-image:url(../img/Feedback_bkg_14.png);
position:fixed;
bottom:0px;
width:960px;
height:292px;
margin:0;
}
<div id="feedback">
<div id="feedbackTab"></div>
<div id="feedbackBody">
<div id="comments">
<h2>Comments/Suggestions</h2>
<input class="commentsTxt" type="text" name="Comments"><br \>
<input id="commentsSubmit" type="submit" value="Submit">
</div><!-- end comments -->
<div id="problems">
<h2>Problems?</h2><br \>
<label id="email">Email:</label><input class="emailBox" type="text" name="Email"><br \>
<label id="problem">Problem: </label><input class="problemBox" type="text" name="Comments"><br \>
<input id="problemsSubmit" type="submit" value="Submit">
</div><!-- end problems -->
</div><!-- end feedbackBody -->
</div><!-- end feedback -->
當你說「在頁面的底部粘在一起」,你能解釋一下你的意思是多一點? – user1636130
所以#feedbackTab應該位於#feedbackBody的較高位置(ontop)。皮特,這是堆棧順序。我正在談論頁面上的垂直位置。我想將#feedbackTab的底部附加到#feedbackBody的頂部。 – Scott