helloise Posted July 18, 2011 Share Posted July 18, 2011 i need to check if the user is using IE9, and then build a css for it. i have no idea where to start. how do i do this please? the website was developed for viewing in chrome and FF. no provision was made for ie9.. can somebody help please? thank you Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted July 18, 2011 Share Posted July 18, 2011 If it was made properly for firefox, it should run perfect in IE9. If not run it through a validator and read the sticky besides that you could use conditional comments (google that) to target specific versions of IE. But as said if you did a good job, it should just run good in IE9 Quote Link to comment Share on other sites More sharing options...
helloise Posted July 18, 2011 Author Share Posted July 18, 2011 thanks, the thing is i inherited the code from some-one else and when the website was first coded, no provision was made for any IE, and the client made it well known that it does NOT show properly on ie9 i will have to build in something like: <?php if ( stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 9.') ) { echo "<table class='table_format_content_rbc_IE' border='0'>"; } else { echo "<table class='table_format_content_rbc' border='0' >"; } ?> Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted July 18, 2011 Share Posted July 18, 2011 well as said if it is not done properly (as in invalid) run it through a validator. Ones you fixed that it should just work. IE9 is a great browser, and i have a feeling IE gets blamed for no reason at all by people. The days of IE 6 are over and there only a few little things in IE7 and IE8 but mostly it's the coder that screwed up. As for my hint: google for conditional comments: here you go: http://www.google.nl/#hl=en&xhr=t&q=conditional+comments&cp=14&pf=p&sclient=psy&site=&source=hp&aq=0&aqi=g5&aql=&oq=conditional+co&pbx=1&bav=on.2,or.r_gc.r_pw.&fp=6dd8290d696847c9&biw=1280&bih=676 any of the first links. Rather use that instead of messing up your php scripts. (what if there is a version IE10 11 etc) But again, if i were you, validate your code. If it doesn't work properly in IE9 the coder did a bad job and that should be corrected instead of getting bandages to camouflage the code. It will save you time in the end. EDIT: if you have a link to the website i can give it a small glimpse to see some often made mistakes Quote Link to comment Share on other sites More sharing options...
remybink Posted July 31, 2011 Share Posted July 31, 2011 helloise, the days of coding for IE versions are gone unless you are accounting for ie7 as cssfreakie said -- to be written properly, the css will work in all current browsers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.