2012-03-01 54 views
0

我試圖組織這兩個文本框的位置和搜索按鈕組織現在的位置是對按鈕和文本字段,你看他們是不是在CSS中content box DIV中正確定位,我不知道這是影響誰在這裏,我怎麼能解決的位置是爲了請通過CSS

這裏是我的CSS代碼

body { 
    background-image: url(images/stripe_4ea7f17e6b72307ec0cd17cc6d27f657.png); 
    margin:50px 0px; padding:0px; 
    text-align:center; 
} 

#content { 
    border-radius: 15px; 
-moz-border-radius: 15px; 
-webkit-border-radius: 15px; 
border: 6px solid #BDF4FC; 
width:50%; 
height:150px;; 
margin:0px auto; 
    text-align:left; 
    padding:15px; 
    margin-top:12%; 
    background-color:#ffffff; 
} 

#search { 
    height: 42px; 
    border: medium solid #63D1F2; 

} 
#button_style { 
    background-image: url(images/search_button.png); 
    height: 44px; 
    width: 92px; 
    background-color: #FFF; 
    border: 0px none #FFF; 

} 

HTML代碼:

<div id="content"> 
<form action="" method="get"> 
<input name="" type="text" id="search" /><input type="submit" value="" id="button_style" /> 
</form> 

</div> 

如何解決日是?

how can i organize the position for these text field and button

回答

1

添加vertical-align:middle;#button_style

Demo

+0

謝謝,我已將這段代碼添加到他們,它工作:) – 2012-03-01 16:18:51