我知道答案很简单,它可能是一个小小的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