我知道答案很簡單,它可能是一個小小的CSS屬性,但我試圖找到解決方案,而沒有問它在這裏,沒有運氣..爲什麼這一個div容器阻止另一個漂浮的權利?
div容器內有兩個div容器,他們打得不好。
其中一個定位在父div的右上角,並且不會讓任何其他容器浮動到其右側。
我試圖display:inline
和display:inline-block
,但沒有運氣...
下面的代碼,雖然東西告訴我的回答是那麼容易,你不會需要它!:
父DIV,上右上角DIV,可憐的DIV試圖浮動權:
#um-home-section4 {
width:100%;
height:300px;
background-color: green;
}
#um-title-right {
float:right;
width:500px;
height:50px;
margin-right:20px;
margin-top:20px;
background-color: fuchsia;
}
#take-me-there {
float:right;
margin-top:240px;
margin-right:0px;
height:50px;
width:100px;
background-color: gray;
}
<div id="um-home-section4">
<div id="um-title-right"></div>
<div id="take-me-there"></div>
</div>
有任何HTML? –
完成。 --------- – jspinella