我希望#araclar下的div让它的右边界保持在同一条线上。如何防止它移动?
CSS:
#düzenleyici{
border: 1px solid #000;
width: 600px;
height: 300px;
box-shadow: 1px 1px 4px #000;
}
#araclar{
width:auto;
height:50px;
background:#EEEEEE;
display:block;
padding:5px 15px 5px 15px;
border-bottom:1px solid #000;
}
#araclar>div{
padding:0 5px 0 5px;
display:inline;
border:1px solid #000;
}
HTML:
<div id="düzenleyici">
<div id="araclar">
<div>
Renk
<div>
</div>
</div>
答案 0 :(得分:2)
将display: inline;
更改为display: inline-block;
答案 1 :(得分:2)
答案 2 :(得分:2)
IMO你的CSS没有问题
您的HTML格式错误,请关闭您设置div
display:inline
<div id="düzenleyici">
<div id="araclar">
<div>
Renk
</div> <!-- yOU have not closed the tag here -->
</div>
</div>