Alignment issue on IE 7
I have a div tag and there is an asp.net TextBox control. I wanted to align the text box to left border. But the text box leaves a space of some 100px on the left. I tried padding:0px, margin:0px, float:left etc... but none solved the issue. It works fine on开发者_如何学运维 other browsers. And i already have conditional comments to support different browsers. Any idea why the space comes up on the left on IE 7?
Here is the code
<div class="keywords-div">
<asp:TextBox ID="keywordSearch" CssClass="txt-keywords" type="text" size="30px" />
</div>
.txt-keywords
{
width: 340px;
float: left;
background: transparent;
height: 28px;
border: 0px;
font-size: 18px;
line-height: 38px;
padding: 0px;
margin: 0px;
}
.keywords-div
{
width: 378px;
height: 38px;
text-align: left;
padding: 0px;
margin: 0px;
clear: both;
border:1px solid red;
}
use
_padding:0;
_margin:0;
*paddin:0;
*margin:0;
精彩评论