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
https://forums.phpfreaks.com/topic/177597-solved-the-ie-or-ff-detector/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.