I have a textbox. When i hover upon it, using chrome, it works fine. However, none of the IE versions are seems to recognize the hozer effect. Here is my css file.
.myOnlyTextbox
{
background-color:White;
}
.myOnlyTextbox:focus
{
background-color: #FFDFBF;
font-weight: bold;
}
.myOnlyTextbox:disabled
{
border-width: 0px;
background-color: transparent;
font-size: 14px;
}
.myOnlyTextbox:hover:enabled
{
background-color: #FFB66C;
}
and here is my master file
<!DOCTYPE xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server" >
<title></title>
<link href="Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
and in the child pages, I am using this header:
asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<link href="../Styles/myTextbox.css" rel="stylesheet" type="text/css" />
</asp:Content>
and in the body tag, i define textbox like this.
<asp:TextBox ID="txtSearchByBowzerNo" runat="server" ValidationGroup="ByNo"
CssClass="myOnlyTextbox"></asp:TextBox>
How can I use this css in almost all browsers? any idea?
:enabled and :disabled aren’t supported in IE < 9; so a fall-back might be required… Try to use selectivizr.js…. CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8. Simply include the script in your pages and selectivizr will do the rest. http://selectivizr.com/