gpt4 book ai didi

html - 将元素定位到右侧

转载 作者:太空宇宙 更新时间:2023-11-04 04:23:15 24 4
gpt4 key购买 nike

我正在尝试使用 css3 制作类似的东西,但我不知道如何将搜索按钮定位在“结果”div 的右侧。不在标签之后

what i am trying to achieve

        <div id="ResultBox" style="margin-right:10px;margin-top:5px; height:90%;">
<div class="result" style="display:inline;">
<div style="height:100px; width:150px;">
Name:
<label>Mojtaba Iranpanah</label><br>
Email:
<label>00000000</label><br>
Phone Numner:
<label>00000000</label>
</div>
<div class="btn" style="float:right;">
<button>Search!</button>
</div>
</div>
</div>

最佳答案

这应该可以解决您的问题:

<div id="ResultBox" style="margin-right:10px;margin-top:5px; height:90%;">
<div class="result" style=""> <!-- display:inline here has no effect -->
<!-- Here is the place to put the display -->
<div style="display:inline-block; height:100px; width:150px;">Name:
<label>Mojtaba Iranpanah</label>
<br>Email:
<label>00000000</label>
<br>Phone Numner:
<label>00000000</label>
</div>
<!-- Here is the place to put the display -->
<div class="btn" style="display:inline-block; vertical-align: middle; height: 100px;">
<button>Search!</button>
</div>
</div>
</div>

演示:http://jsfiddle.net/t92c2/2/

关于html - 将元素定位到右侧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18738284/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com