我創建的登陸頁的形式,所以我想保持並排文本輸入框邊,所以我不作形式非常long.I試圖做這樣的事情:如何將兩個文本字段並排放置?
但現在看來真的很難,這就是我目前的形式是這樣的:
.teaser-right {
float: right;
width: 45%;
margin: 3% 0 0 0
}
#calltoaction-form {
background: #f2f2f2;
padding-bottom: 10px;
width: 800px;
position: right;
bottom: 0
}
<div id="calltoaction-form" class="teaser-form">
<div class="form-title">
<h3>sample form</h3>
</div>
<form id="contact_form" action="_contact-us.php" method="post">
<div class="form-header">
<h4>Personal details</h4>
</div>
<div class="form-section">
<input id="name" name="name" type="text" placeholder="Your name">
</div>
<div class="form-section">
<input id="email" name="email" type="text" placeholder="Your email">
</div>
您有沒有顯示在HTML的單個元素具有類'傳情,right' - 所以你怎麼能指望在你的CSS該規則採取任何效果? – CBroe