在我的网站底部,我有一个注册表格。我不能让按钮在同一行并靠近电子邮件。
它已经分配了一个类,所以它只是关于css的,但我不是css方面的专家:(
这是HTML代码:
<div class="mc4wp-form-fields"><h1 align="center">
Want to hear updates on the future releases?
</h1><br>
<input type="email" name="EMAIL" placeholder="Your email address" class="signup" required="">
<input type="submit" value="Sign up" class="signup_button">
知道怎么做吗???
您的输入宽度为100%,因此占用了容器的100%。
input[type="email"] { width:/*something thats not 100%*/ }
您可以浮动它们,前提是两者都没有设置为100%宽度。。。
<input style="float:left;" type="email" name="EMAIL" ....
<input style="float:right;" type="submit" value="Sign up" ....