I have a function that works beautifully in Firefox, but in Internet Explorer it fails. IE interprets the z-index as a negative value and puts a picture behind the other buttons. Is there a way I can hide only specific CSS code or specific html from IE 7?
You can have 2 different functions/css classes: one of IE and one for FF. Then depending on the client browser use the one that works.
so put a function in
then something like this:
function pickcss() {
if (navigator.appName == “Microsoft Internet Explorer”) {
document.getElemenyById(“myitem”).classname = IEclass;
}
else {
document.getElemenyById(“myitem”).classname = FFclass;
}
}
you can also check version of IE if needed with navigator.appVersion.
November 23rd, 2006 at 10:07 am
You can very well do that.
In your html file, in body’s onload event call a function let’s say browserCheck()
In that, you write a conditional statement
if (navigator.appName == ‘Microsoft Internet Explorer’){
// Code for hiding.
}
Hope this helps
November 23rd, 2006 at 12:59 pm
You can have 2 different functions/css classes: one of IE and one for FF. Then depending on the client browser use the one that works.
so put a function in
then something like this:
function pickcss() {
if (navigator.appName == “Microsoft Internet Explorer”) {
document.getElemenyById(“myitem”).classname = IEclass;
}
else {
document.getElemenyById(“myitem”).classname = FFclass;
}
}
you can also check version of IE if needed with navigator.appVersion.