我需要让三个
并排放置。因此,我创建了一个
,并在其中放置了三个
,CSS样式如下:
div.holder div {
float: left;
width: 250px;
background-color: yellow;
/*margin-right:auto; /**These did not help**/
margin-left:auto; */
}
And html like this:
<div class="holder">
<div></div>
<div></div>
<div></div>
</div>
这应该是这样的:
![three divs](https://istack.dev59.com/2f3My.webp)
但实际上,它看起来像这样:
![three divs](https://istack.dev59.com/MNTQp.webp)
div
边框应与灰线的末尾对齐。
float: right
。 - Brewalmargin:auto
。 - Tomáš Zato