I have a wordpress template where I have this code in the header: </div> <?php } ?> <?php if(preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT'])) { ?> <div id="firefox_check"> MY TEXT COMES HERE </div> <?php } ?> Basicly this checks the browser and if it is MS IE it will display "MY TEXT COMES HERE" in the blog. How do I do that it will ALWAYS display the text , no matter what the browser is? Probably a stupid question, but I don't understand php and css. Reps given!
Strip off some phpcode: <?php if(preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT'])) { ?><div id="firefox_check"> MY TEXT COMES HERE </div> <?php } ?> This is what should be left: <div id="firefox_check"> MY TEXT COMES HERE </div>
Thanks man, I actually tried that before, but forgot to remove the <?php } ?> and it made my whole blog crash. Now it works great! Rep given!