不能居中这种形式
问题描述:
我一直在寻找和寻找,我不能中心这个crud。 帮助,将不胜感激。不能居中这种形式
这是相关的HTML
.fade-form {
display: inline-block;
text-align: center;
color: #ffffff;
text-align: center;
animation-name: opac;
animation-delay: 1.3s;
}
<div class="fade-form">
\t \t <form action=" C:\wamp64\www\data.php" method="post">
\t \t \t <label for="platenum ">License Plate</label>
\t \t \t <input type="text" name="platenum " id="platenum">
\t \t \t <input type="submit" >
\t \t </form>
\t </div>
答
有你的HTML本身就是一个结束引号是missing.I'll更喜欢使用问题用于定心的margin:0 auto;
.fade-form{
display: block;
text-align: center;
margin: 0 auto;
color:#ffffff;
text-align:center;
animation-name: opac;
animation-delay: 1.3s;
}
.push-center {
margin : 0 auto;
}
<div class="fade-form">
<form class='push-center' action="C:\wamp64\www\data.php" method="post">
<label for="platenum">License Plate</label>
<input type="text" name="platenum" id="platenum">
<input type="submit"/>
</form>
</div>
答
.fade-form{
background: pink;
display: block;
text-align: center;
color:#ffffff;
text-align:center;
animation-name: opac;
animation-delay: 1.3s;
}
<div class="fade-form">
<form action="C:\wamp64\www\data.php" method="post">
<label for="platenum">License Plate</label>
<input type="text" name="platenum" id="platenum">
<input type="submit"/>
</form>
</div>
你是你的类名首发 – mayersdesign
之前缺少一个点,我想我要得到这一点。抱歉。在发布这篇文章时这是一个错误。请忽略它。 –
...并在标记中关闭逗号;)无论如何,下面的解决方案... – mayersdesign