我有这个代码
<div id="one">
<a href="#" id="test1" >
<button title="test1">test1</button>
</a>
<a href="#" id="test1" >
<button title="test1">test1</button>
</a>
<div id="two" style="background-color: red;">
<form action="/adminTest" method="post"><select id="SelectedCode" name="SelectedCode">
<option value="1">1 page</option>
<option value="2">2 pages</option>
</select> <input type="submit" value="OK" />
</form>
</div>
</div>
我希望我的选择下拉列表出现在按钮的右侧,但它出现在下面。有没有一种简单的方法可以让它按照我想要的方式显示?
最佳答案
您可以 float :左侧
您的链接:
#test1 {
float: left
}
已更新为新的 HTML.. http://jsfiddle.net/PWuCm/4/
根据我对您问题的评论,我将 id
更改为 class
。
关于css - 如何在我的 DIV 上排列选择列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6262931/