html - 网络表格中的间距

标签 html css forms jsfiddle

我在尝试使用 HTML/CSS 分隔和排列表单时遇到了一些问题。

我已经在下面发布了 jsfiddle。

我正在尝试将提交按钮与电子邮件提交表单的边框对齐。

谢谢!

http://bit.ly/1embiFX

HTML

<form target="_blank" class="validate" name="mc-embedded-subscribe-form" id="mc-embedded-subscribe-form" method="post" action="#">
<input type="email" value="yourname@beerisawesome.com" onblur="if (this.value == '') {this.value = 'yourname@beerisawesome.com';}" onfocus="if (this.value == 'yourname@beerisawesome.com') {this.value = '';}" id="mce-EMAIL" class="required email" name="EMAIL">
<input type="submit" onclick="_gaq.push(['_trackEvent', 'Sign Up', 'Click', 'Mailing List Address Entered']);" id="mc-embedded-subscribe" name="subscribe" value="JOIN" class="submit button">
</form>

CSS

form {
    margin: 0;
    font-family: 'Merriweather', serif;
    height: 75px;

}
input.email {
    width: 60%;
    height: 75px;
    font-family: 'Merriweather', serif;
    padding-left: 30px;
    font-size: 18px;
    color: #c89808;
    border: 2px solid #000000;
    -webkit-border-top-left-radius: 10px;
    -webkit-border-bottom-left-radius: 10px;
    -moz-border-radius-topleft: 10px;
    -moz-border-radius-bottomleft: 10px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    background-color: transparent;

}

input.email:focus {
    outline: none;
}

input.submit {
    width: 20%;
    margin-left: -5px;
    margin-top: 50px;
    font-family: league;
    font-size: 30px;
    color: #efbe2a;
    height: 75px;
    background: #000000;
    -webkit-border-top-right-radius: 10px;
    -webkit-border-bottom-right-radius: 10px;
    -moz-border-radius-topright: 10px;
    -moz-border-radius-bottomright: 10px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border: none;
    letter-spacing: 0.05em;
}

最佳答案

只需更改高度并为 input.email 类添加垂直对齐

height: 69px;
vertical-align:top;

工作演示:http://jsfiddle.net/edisutrisno/8V8dg/3/

关于html - 网络表格中的间距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18662287/

相关文章:

asp.net - 如何禁用表单例份验证

html - 容器 Div 未扩展且页脚卡住

jquery - 如何使 div 宽度可拖动?

php - 将数据从mysql传递到php到gotowebinar(通过表单post)

html - 悬停时保持字体/文本倾斜

html - 如何修复按钮中的跨度包装

javascript - 选择某些值时,如何防止使用 onchange 提交表单的表单提交

javascript - 在 React 中使用静态 HTML

html - 单击<summary/>内的元素时如何防止<details/>展开/折叠?

html - Bootstrap 2 错误? [class* ="span"] 奇怪的问题