水平对齐输入字段 [英] Horizontally aligning input fields

查看:87
本文介绍了水平对齐输入字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图得到一个输入字段,它与同一水平线上的提交按钮相关,但证明是一个挑战。

I am trying to get an input field, and it's associated submit button on the same horizontal line, but proving to be a challenge.

这是我的代码:

<form name="prodSearch" action="/products/index.cfm" method="post">
        <input type="text" name="prodKeyword" maxlength="50">
        <input type="image" name="submit" src="/_css/images/but-ok-small.png">
</form>

您可以在(表单位于标题中)查看网站: http://d620923.u161.fasthit.net/

You can view the site at (form is in the header) : http://d620923.u161.fasthit.net/

基本上我要么需要轻轻推动一下输入框,要么稍微按下按钮。我已经尝试了所有的东西..线高度,填充,边距,表等..但不能让他们budge。

Basically I either need to nudge the input field up a bit, or the button down a bit. I've tried everything.. line height, padding, margin, tables etc.. but can't get them to budge.

任何建议非常感谢!!!

Any suggestions greatly appreciated !!!

推荐答案

将此添加到您的样式中。

add this to your style.

#productSearch form input {
    vertical-align: middle;
}

这篇关于水平对齐输入字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆