<div id="header">
<div id="search" style="float:right;width:250px;padding:20px 6px 6px 6px;">
<form action="/" method="get" id="frmSiteSearch" name="frmSiteSearch">
<input type="text" id="searchbox" name="keyword" size="20"/>
<div style="width:22px;height: 19px; float:left;background-color:green;">
</div>
</form>
</div>
</div>
和jsbin here。CSS - 將div對齊文本框的右側
我想讓綠色背景的div出現在文本框的右側。
感謝@ManseUK。有用。 10分鐘後我會接受。 – SyAu