2015-07-20 52 views
-2

我试图让我的注册表格回应,我曾尝试加入让一个div响应和内容里面

在外层div

width:100%; 

,并在内部DIV

margin-left:auto; 
margin-right:auto; 

但我不认为它正在工作。 更新 我在wordpress上,这是我的网站link,这里是问题区域的屏幕截图。 link

+1

您可以加入关于你的注册表格到整个HTML和CSS代码你的问题o r做一个jsfiddle? – Jop

+1

请使用您当前的css和html代码创建一个代码片段。 – emmanuel

+0

我在wordpress上,这是我的网站[链接](http://wpgeeks.net/),这里是问题区域的屏幕截图。 [link](http://prntscr.com/7uufle) –

回答

0

这里的东西还是传统:

.sign_up_center { 
    width: 100%; // responsive, for smaller screen 
} 
#field_2_1 { 
    // force height, if not, your button goes on your field 
    width: 100%; 
    height: 50px; 
} 
#input_2_1{ 
    // full size mail field 
    display: block; 
    width: 100%; 
} 
#gform_submit_button_2{ 
    // full size submit button 
    width: 100%; 
} 

0

使用margin: 0 auto;

body { 
 
    width:100%; 
 
    height:100%; 
 
    
 
    background:grey; 
 
} 
 
form { 
 
    width: 50%; 
 
    min-height: 1000px; 
 
    margin: 0 auto; 
 
    background: lightgrey; 
 
    text-align:center; 
 
} 
 
input { 
 
    display: block; 
 
    margin: 0 auto; 
 
}
<form> 
 
    sign in 
 
    <input type="text"/> 
 
    <input type="password"/> 
 
</form>

+0

请参阅我的问题更新 –

+0

你应该尝试隔离你的代码,在你的问题中发布,所以我们可以更好地帮助你,这不是我们为你工作的地方。请参阅@Paulie_D – aahhaa