help with css

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
bouncer
Forum Contributor
Posts: 162
Joined: Wed Feb 28, 2007 10:31 am

help with css

Post by bouncer »

hi there,

i have this .css file, it work just fine in firefox, but in IE it don't work, like in the input tags i've set the background using background:#fff0ee; but nothing happens in ie ... :(

Code: Select all

 
fieldset {
    border:solid 2px #DEDEDE;
    margin-left:100px;
    margin-top:15px;
    width:450px;
    height:375px;
}
fieldset ul, fieldset li {
    border:0; 
    margin:0; 
    padding:0; 
    list-style:none;
}
fieldset li {
    clear:both;
    list-style:none;
    padding:10px;
}
fieldset input {
    font-size:0.8em;
    padding:4px;
    float:left;
    border:1px #888 solid;
}
fieldset select {
    font-size:0.8em;
    padding:4px;
    float:left;
    border:1px #888 solid;
}
fieldset textarea {
    font-size:0.8em;
    padding:4px;
    float:left;
    border:1px #888 solid;
}
fieldset input:focus {
    background:#fff0ee;
}
fieldset select:focus {
    background:#fff0ee;
}
fieldset textarea:focus {
    background:#fff0ee;
}
fieldset label {
    width:140px;
    float:left;
}
 
thanks in advance
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: help with css

Post by jayshields »

It's because IE doesn't support the :focus pseudo class. A simple Google search could have told you that. You can accomplish the same thing using JavaScript though. Look into the onFocus and onBlur JavaScript events.
bouncer
Forum Contributor
Posts: 162
Joined: Wed Feb 28, 2007 10:31 am

Re: help with css

Post by bouncer »

jayshields wrote:It's because IE doesn't support the :focus pseudo class. A simple Google search could have told you that. You can accomplish the same thing using JavaScript though. Look into the onFocus and onBlur JavaScript events.
thanks, jayshields, i managed to solve this problem using javascript like you said. :D
Post Reply