
我有一个基本的联系表单,但是当我尝试使用CSS对其进行自定义时,它将无法自定义,因为我希望将表单放在中间,并希望我的姓名,电子邮件和地址;在第一行的年龄和主题上选择年龄,并在节的行中选择类别,在最后一行显示大文本框,在底部选择按钮,但是由于某种原因,表单无法自定义.我做错了什么吗?
我尝试了无数的CSS输入,例如float,文本对齐,左空白,左空白甚至显示.我已经在互联网上搜索并寻找了教程,甚至尝试了该教程,但仍然一无所获.
我的htm代码是:
<li><button ID="mouthoff-button">Mouthoff</button><div ID="mouthoff-modal" ><div ><div ><span >×</span></div><div ><h3>MOUTHOFF - TELL US WHAT'S ON YOUR MIND</h3> <p>Have something you want to tell us,ask us or bring to our attention? Feel free to Mouthoff and let us kNow here. Please bear in mind that we may not be able to answer absolutely everything and we won't reveal to you any game info that hasn't yet been announced,but we're always happy to have a look at what you have to say.<br><p>If you have a technical issue that you'd like to report,<a href="#">please contact our Support Team</a>.</p> <form> <input type="text" name="name" placeholder="name"> <input type="email" name="email" placeholder="Email"> <input type="number" name="age" placeholder="Age" min="13" max="100"> <input type="text" name="subject" placeholder="Subject"> <select name="category_ID" required="required" ID="category-ID"> <option value="">Select category</option> <option value="1">General Suggestions</option> </select> <textarea name="body" rows="4" placeholder="Talk To Us" templates="<div class="form-group col-xxs-12"></div>" oninvalID="setCustomValIDity('You need to provIDe content')" oninput="setCustomValIDity('')" maxlength="5000" required="required"></textarea> <button type="submit">submit</button> </form>我的CSS是
.mouthoff-modal-body input[type=text],input[type=email] { float: right; margin-left: 150px; padding-left: 25px; display: inline-block;}我知道他们不是很多CSS,但是我尝试了几乎所有我能想到的东西.最佳答案注意导入的文件和库,任何CSS或Js或jquery库的顺序,它们倾向于覆盖您的代码.
在所有文件之后的head标签末尾链接您的CSS文件.
导入所有文件后,将Js文件放在文件底部.
总结以上是内存溢出为你收集整理的html-如何将联系表单居中并在某些行上放置某些输入 全部内容,希望文章能够帮你解决html-如何将联系表单居中并在某些行上放置某些输入 所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)