Jump to content

[SOLVED] The IE or FF detector


egturnkey

Recommended Posts

Hello Friends,

 

Problem of today ( we seek for php help ) as following ,

 

we know all that PNG images not shown well on IE6 and some "css'ers" given us a solution --> fine 1

 

but if that PNG is within css hover code no way to be working correctly i.e i've tried millions of ways all failed

 

 

the only way i've got is to use something called "filter"

 

but that filter is not working for FF and only working for IE

 

so i wonder if

 

 

- we are able to set a php code

 

if ( it IE) then ( run style_ie.css ) if not ( IE ) then ( run style_ff.css )

 

 

hence is there any code to detect it and can be re-write as if X then Y and if not then Z

 

 

hope you got wt i mean ....

 

thanks in advance

Link to comment
Share on other sites

If you're looking for an if, elseif, else syntax:

 

<?php
if (/*IE condition*/) {
/* Code to Execute */
}
elseif (/*FF condition*/) {
/* Code to Execute */
}
else {
/* Code to Execute */
}
?>

 

If you're looking for the conditions themselves, you might want to read up on this PHP variable:

$_SERVER['HTTP_USER_AGENT']

 

You can set up a javascript that check's the user's browser and then loads a CSS file as an alternative

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.