0
I have 2 input fields 1. Name  2.Start date .  Both the input fields are created using Asp.Net controls.The 'Name'  input field has a default 'X' clear field when focus is put on input field in IE11. But the second input field 'Start Date' doesn't have a 'X'  clear field.

1st question:I have used the below code and it works when document mode is 10 or above.But how to make 'X' clear field disappear when document mode is 9 or below in IE11.




2nd question: According to IE11 it should by default place 'X' clear field in all the input text fields. But i don't see in 'Start Date' field. Is it because 'Start  Date' is a date field?



 Code:   

    input[type=text]::-ms-clear {
        display:none;
    }





for the name field html used:

<div class="text">
<asp:TextBox ID="nameTextBox" MaxLength="40" runat="server"></asp:TextBox> </div>





For the Start Date field html used is:

<div class="text short">
<asp:TextBox ID="startDate" MaxLength="10" runat="server" />
</div>

Following are the CSS styles applied:

.entry-form .text input { 
width: 90%; 
}     

.entry-form .text.parent-focus input {
    padding: 10px 30px 10px 10px; } 

.entry-form .text.short input {
    width: 6.41em;
} 
                                                                                                                           .entry-form .text.short.parent-focus input {
    width: 121px;
}

When i am increasing the width of Start date field from 121px to 136px i see 'X' clear field. So is it related to browser settings( 'X' clear field appearing only when the width is more than 136px ) Thanks in advance. Any help is appreciated.

raj
  • 39
  • 7
  • if your input type is not the string "text" then your css wont effect it - and the -ms-clear pseudo element is only "valid" in IE10+/Edge – Jaromanda X Aug 12 '16 at 01:07
  • So you mean to say as "Start Date" is not a string "text" field IE11 wont place a default 'X' Clear field? – raj Aug 12 '16 at 02:03
  • the CSS targets HTML like `` only ... as you have posted no HTML, I can only guess that your `start date` control is not like the above – Jaromanda X Aug 12 '16 at 02:05
  • for the name field html used:
    – raj Aug 12 '16 at 18:14

0 Answers0