【发布时间】:2014-07-13 07:26:47
【问题描述】:
我不精通前端网页设计或 CSS。使用 Foundation 的预制模板,但是我的搜索按钮代码与示例按钮不对齐。
使用此模板:http://foundation.zurb.com/templates/workspace.html
谁能告诉我如何将搜索按钮向右移动,如图中蓝色按钮所在的位置?
这是我现在使用的:
<input type="submit" value="Search" style="float: right;">
<ul class="right">
<li class="search">
<li class="has-button">
/* Original template form */
{#<form>#}
{#<input type="search">#}
{#</form>#}
/* My form with code */
<form action="{{ path('sym_corp_search') }}" method="GET">
<label><input type="search" name="q" value={{ app.request.query.get('q') }}></label>
<input type="submit" value="Search" style="float: right;">
</form>
</li>
</li>
/* Original form button in blue */
<li class="has-button">
<a class="small button" href="#">Search</a>
</li>
【问题讨论】:
-
你能发个小提琴吗?
-
更新了代码,虽然看起来很奇怪
-
@MuhammadAli 不,这不起作用。这使我的搜索按钮略微向左,但它仍然在底部。
-
jsfiddle.net/W2Yst/5 我更新了你的代码