Page 1 of 1

help with css

Posted: Tue Aug 26, 2008 7:04 am
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

Re: help with css

Posted: Tue Aug 26, 2008 7:19 am
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.

Re: help with css

Posted: Tue Aug 26, 2008 9:41 am
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