2016-03-30 24 views
0

ben merkezli altta sağda boyunca textarea ve düğmesi ile geri besleme etiketi konumlandırmak için kodumu ayarlamak çalışıyorum konumlandırma değil metin alanı ve düğmesine basın. Onları düzgün hizalamak için alamadım ve bir süre onunla mücadele olduğunu ve şimdi biraz yardıma ihtiyacım:Etiketler, düzgün

HTML

<div class = "formBkg"> 
<br></br> 
<label class = "lbl">First Name: <b class = "red">*</b></label><input class = "inp" type = "text" name = "fName" placeholder = "Adam"> 
<label class = "form">Feedback about the site: <b class = "red">*</b></label> 
<textarea class = "area"rows = "5" cols = "50" name = "feedback" placeholder="Enter your comments..."></textarea> 


<p><label class = "lbl">Surname: </label><input class = "inp" type = "text" name = "sName" placeholder = "Richardson"></p> 
<p><label class = "lbl">Email: </label><input class = "inp" type = "email" name = "eMail" placeholder = "[email protected]"></p> 

<p><label class = "lbl">Rate the website: <b class = "red">*</b></label></p> 
<input type = "radio" name = "rating" value = "terrible"> Terrible 
<input type = "radio" name = "rating" value = "poor"> Poor 
<input type = "radio" name = "rating" value = "adequate"> Adequate 
<input type = "radio" name = "rating" value = "good"> Good 
<input type = "radio" name = "rating" value = "excellent"> Excellent 
<p><input type = "button" name = "input" value = "Submit" class = "btn"></p> 
</div> 

</form> 

CSS

.red{ 
    color: #ff0000; 
} 
.inp{ 
    padding: 5px 0 5px 5px; 
} 

.lbl{ 
    padding: 0 20px 0 150px; 
    padding-right:20px; 
    font-weight: bold; 
    font-size: 20px; 
    width: 220px; 
    float:left; 
} 
.formBkg{ 
    background-color: #696969; 
    color: #ffffff; 
    padding: 20px 0 20px 0; 
} 
.form{ 
    padding: 0 700px 0 20px; 
    font-weight: bold; 
    font-size: 20px; 
    width: 220px; 
    float:right; 
} 
.area{ 
    float:center; 
} 

.btn{ 
    text-align: center; 
} 
+0

Eğer sizin için hedef konum ve ne alıyoruz şeyin bir screeshot gönderir misiniz merkezinde etiketi uyumlu hale getirecektir? – BHouwens

+0

http://tinypic.com/r/2uz4d5g/9 Üzgünüm evden uzaktayım ve aygıtlarım bozuluyor ... Ama bu kabaca fikir ... – qudz

cevap

0

set yüksekliği <textarea> ve aynı çizgi <label>

CSS

için -height
.area{ 
    height:100px; 
} 
.form{ 
    line-height:100px; 
} 

bu 210 dikey