views:

28

answers:

0

Hi,

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;
}