-1
我的HTML代碼如何設置DIV寬動態基於高度
<div class="persoonal">
<div class="left"></div>
<div class="rigth"></div>
</div>
我的CSS代碼
.profile {
width: 100%;}
.left {
width: 50%;
float: left;
height: auto;
display: inline-block;}
.rigth {
float: right;
width: 48%;
height: 100px;
display: inline-block;}
我是新來的HTML,
我想給人留下的div寬度當右側div的高度爲100px時,爲50%, ,並且當它的高度高於100px時,我想給出相同的左側div寬度100%。
有什麼建議嗎? 在此先感謝。