2013-02-11 94 views
1

火狐,Safari,IE
enter image description hereenter image description hereenter image description here如何設置字段位置?

正如你可以在不同的瀏覽器中看到出現inputdiv之間1-2 PX差異,如何清除?

HTML:

<input type="text" class="my-input-select" disabled="disabled"/> 
<div class="my-input-select-box" > 
    <ul style="z-index:100"> 
     <li>All</li> 
     <li>Products</li> 
     <li>Categories</li> 
     <li>Clients</li> 
     <li>News</li> 
    </ul> 
</div> 

CSS:

.my-input-select{ 
    border: 1px solid #acacac; 
    -webkit-border-radius: 5px; 
    -moz-border-radius: 5px; 
    border-radius: 5px; 
    padding: 5px; 
    background: url(images/forms/select.png) no-repeat 98% center; 
    cursor: pointer; 
    display: block; 
} 

div.my-input-select-box{ 
    position: relative; 
    margin: 0; 
    padding: 0; 
} 

div.my-input-select-box ul{ 
    position: absolute; 
    background: red; 
    left: 110px; 
    top: 26px; 
    width: 172px; 
    z-index: 100; 
    margin: 0; 
    padding: 0; 
} 

div.my-input-select-box li{ 
    border-bottom: medium none; 
    color: #393939; 
    cursor: pointer; 
    display: block; 
    font-size: 12px; 
    line-height: 12px; 
    list-style-type: none; 
    margin: 0; 
    padding: 6px 2px 6px 10px; 
} 
+0

你能提供的所有相關的代碼? – Kingk 2013-02-11 12:25:28

回答