我對網絡編程非常陌生。表單元素不會移動到中心
我有我的head
標籤內的樣式標籤是這樣的:
<style type="text/css">
.center {
float: none;
margin-left: auto;
margin-right: auto;
}
我使用Twitter的引導。我有我的form
包裹div
塊
<div class="center"
<form>
<fieldset>
<legend>Legend</legend>
<label>Label name</label>
<input type="text" placeholder="Type something…">
<span class="help-block">Example block-level help text here.</span>
<label class="checkbox">
<input type="checkbox"> Check me out
</label>
<button type="submit" class="btn">Submit</button>
</fieldset>
</form>
</div>
內但form
元素,甚至沒有移動到中心。
我在哪裏犯錯?
試試這個: .center { 文本對齊:中心; } 或將div標記替換爲