.helpdesk ul {
width:750px;
list-style-type:none;
list-style-position:outside;
margin:0px;
padding:0px;
text-align: center;
bottom: 100px;
}
.helpdesk li{
padding:12px;
border-bottom:1px solid #eee;
position:relative;
text-align: center
bottom: 100px;
center: 20px;
}
.helpdesk h2 {
margin: o;
display: inline;
}
.helpdesk label {
width:150px;
margin-top: 3px;
display:inline-block;
padding:3px;
text-align: center;
bottom: 100px;
}
<ul>
<li>
<h2>Help Desk</h2>
</li>
<li>
<label for="name">Name:</label>
<input type="text" name="name" placeholder="John Doe"/>
</li>
<li>
<label for="email">Email:</label>
<input type="text" name="email" placeholder="JohnDoe@example.com" />
</li>
<li>
<label for="website">Phone Number:</label>
<input type="text" name="Phone" placeholder="###-###-####" />
</li>
<li>
<label for="message">Message:</label>
<textarea name="message" cols="40" rows="6">
</textarea>
</li>
<li>
<button class="submit" type="submit">Submit </button>
</li>
</ul>
我正在试图弄清楚如何将我的UL和Li移动到页面的中间底部似乎无法正确,无论如何都要做到这一点。我尝试在线查看,当我需要底部中心时,它只给我左下角或右下角
答案 0 :(得分:0)
将样式规则margin:auto
添加到.helpdesk ul选择器