html - 格式化输入表单 html 间距的最佳方法

标签 html css cross-browser

我有下面的代码,基本上是一个输入表单,因为我现在有它,在我的浏览器上执行时,每个字段的标题和字段之间的间距都正确排列,但是当我在另一个浏览器上尝试时,一些间距关闭,对齐输入的最佳方式是什么,以便它在所有浏览器上呈现相同?

<div style="z-index:12; position:absolute">
<font style="color:#FF6600; font-family:pirulen">
*Name: <input type="text" name="name" style=" margin-left:70px" size="30px" /><br/>
*Email: <input type="email" name="email"  style="margin-left:70px; margin-top:5px; " size="30px"  /><br/>
Company: <input type="text" name="company"  style="margin-left:28px; margin-top:5px"  size="30px" /><br/>
Address: <input type="text" name="address"  style="margin-left:30px; margin-top:5px"  size="30px" /><br/>
Address 2: <input type="text" name="address2"  style="margin-left:10px; margin-top:5px"  size="30px" /><br/>
City: <input type="text" name="city"  style="margin-left:92px; margin-top:5px"  size="30px" /><br/>
State: <input type="text" name="state"  style="margin-left:65px; margin-top:5px"  size="30px" /><br/>
Zip: <input type="text" name="zip"  style="margin-left:106px; margin-top:5px"  size="30px" /><br/>
*Phone: <input type="text" name="phone"  style="margin-left:58px; margin-top:5px"  size="30px" /><br/>
*Comments:<textarea style=" margin-left:12px; margin-top:5px; vertical-align:top; resize:none"   name="comments" cols="30" rows="10" draggable="false"></textarea><br/>
<input type="submit" value="Submit" style="margin-left:150px" />

谢谢

最佳答案

这很好地涵盖了它:

http://www.alistapart.com/articles/prettyaccessibleforms

样式化的无序列表、标签和输入。

关于html - 格式化输入表单 html 间距的最佳方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9675098/

相关文章:

html - 为什么 margin-bottom 消失而没有边框

javascript - 无法将变量获取到 Jquery 函数中

html - 如果发生自动换行,如何调整 div 的宽度?

php - 浏览器是否支持 ajax 加载的登录表单的自动完成?

jquery - 用于后拉伸(stretch)的图像的理想尺寸是多少

html - Bootstrap 推特导航栏中的 Logo 重叠

javascript - 在 View 中激活 javascript 动画

html - `css` 的 `html_page()` 参数是否与 blogdown 中的 `build_site(method = ' html')` 一起使用?

css - 多列布局中的 block 元素 - Chrome/IE 中的填充问题

javascript - 为什么我的翻转动画在 chrome 和 safari 中不起作用?