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
The IE or FF detector
Moderator: General Moderators
Re: The IE or FF detector
Im not really sure of a shorthand way of doing this, but i checked through the php function list and found
get_browser()
This is a copy/paste example from the website. The only problem is that it requires the list of browsers in the array to be up to date if any new browsers are released.
Detect Browser Class
get_browser()
This is a copy/paste example from the website. The only problem is that it requires the list of browsers in the array to be up to date if any new browsers are released.
Detect Browser Class
Re: The IE or FF detector
The filter: declaration is ignored by Firefox. You should be able to put it in your CSS & Firefox should work fine.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: The IE or FF detector
In PHP you can also check $_SERVER['HTTP_USER_AGENT'] for the information provided by the browser...which is sort of similar to get_browser();