As you may know, Firefox and IE will generate pages 90% of the time that never look the same even though they are the same page. So can someone please point me in the direction of something that cant detect the users browser and display a unique code for every browser this way I can make a page look the same on every browser. I've tried Google, but I can't seem to find the right wording so my searches keep turning up nothing. Regards Doug
That is absolutely the wrong way to achieve x-browser compatibility. Write well formed, well structured, semantic html coupled with css that you understand as it's supposed to work. Once that's done, and you have the rendering you want in modern browsers, it's fairly trivial to apply work-arounds and bug fixes for IE. (In practice, the steps are intermeshed; fixes for IE made as you work.) cheers, gary
How come the part of the url I want to display in this iframe is a different location through out all of the browsers? <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- #container{ width:335px; height:50px; border:1px solid #000; overflow:hidden; margin:auto; } #container iframe { width:800px; height:750px; margin-left:-315px; margin-top:-360px; border:0 solid; } --> </style> </head> <body> <div id="container"> <iframe src="http://" scrolling="no"></iframe> </div> </body> </html> Code (markup):
Here's a way to do it - <?php $br = strtolower($_SERVER['HTTP_USER_AGENT']); // what browser they use. if(ereg("msie", $br)) { # code for IE browser } else { # code for Firefox / Opera etc } ?> PHP: you can also look on google for list of user_agent strings different browsers use, if you wish to pin point a browser. I sometimes use this trick to alter css for IE6
Two possible reasons, but I'm not on Windows to check IE: 1) IE is the worst browser on the planet 2) You're trying to use an inline-frame as a frame.
Not sure, but try JavaScript's Object Detection... like if (document.getElementById), or try the Microsoft's IE Conditional Comments for CSS purposes...
Christ no, browser detection is the devil and PHP and JS are the worst. use this code to detect ie 6 <!--[if lt IE 7.]>CONTENT<![endif]--> and to detect IE generally: <!--[if IE]>CONTENT<![endif]-->
Html code for every browser remail same only they change some scripts. So that display in evry browser become change.