2017-04-24 47 views
0

我想從我的當前窗體下方的重力形式中提交按鈕。將重力形式的提交按鈕放在表單中的中心

例子:

enter image description here

我有我的重力窗體上two-column佈局。該按鈕當前在右列下浮動。

任何想法?

+0

請分享您的代碼 – athi

+0

@athimohan所有重力形式默認代碼。 – Chris

+0

我認爲你可以使用保證金:0自動爲按鈕在中心 – athi

回答

1

試試這個:http://jsfiddle.net/7Laf8/

你基本上把你的按鈕,在一個div:

<div class="wrapper"> 
    <button class="button">Button</button> 
</div> 
With the following styles: 

.wrapper { 
    text-align: center; 
} 

.button { 
    position: absolute; 
    top: 50%;