2017-05-09 63 views
0

我在我的.wysija((郵件詩人))表單上正確排列我的提交表單時出現問題。我希望他們能夠在表格的頂部旁邊碰碰撞,但現在,我正在爲一行中排隊的輸入字段而安頓下來。見下面的圖片。任何幫助深表感謝!!表格上的內聯CSS

((我在wordpress.org帶有.com))

This is what it looks like currently

This is the coding that I currently have for the form

+0

可以應用CSS來的3種元素的父元素? –

+0

或嘗試刪除'float:left',將'display:block'更改爲'display:inline-block'並添加'vertical-align:middle'。如果你能提供能夠複製你所擁有的代碼並向我們展示你可以改變的代碼,它確實會對我們有所幫助。 –

+0

如果有幫助,我的網站是www.themommyhoodmoments.com –

回答

0

嘗試這樣的。

.main-block{ 
 
width:600px; 
 
padding:25px; 
 
} 
 
.name{ 
 
width:200px; 
 
float:left; 
 
margin-right:15px; 
 
} 
 
.email{ 
 
width:200px; 
 
float:left; 
 
margin-right:15px; 
 
} 
 
.btn{ 
 
width:50px; 
 
float:left; 
 
margin-right:15px; 
 
text-align:center; 
 
}
<div class="main-block"> 
 
    <div class="name"><input type="text" placeholder="Enter your name here."></div> 
 
    <div class="email"><input type="text" placeholder="Enter your email here."></div> 
 
    <div class="btn"><input type="submit" class="btn"></div> 
 
    <div class="clear"></div> 
 
</div>