Saturday, April 24, 2010

IE and Firefox?

I am having issues with the IE browser viewing my website.



I am using CSS because it's supposed to so much more efficient than just HTML. I am confused with the proper CSS to detect the person viewing the sights browser. Is there anyone out there that can help?



http://www.jamescrider.com



thanks



IE and Firefox?ie 7





Well, you don't normally use CSS to detect the browser (although you can do this with JavaScript.)



The best way to build cross-browser CSS is to begin with standards-compliant CSS. This will usually work without trouble in Firefox, Safari, Opera, and (usually) IE7.



Then use conditional comments to add a secondary style sheet to handle exceptions with earlier IE forms:



%26lt;!--[if IE %26lt; 7]%26gt;



---stylesheet with IE exceptions here ---



%26lt;![endif]--%26gt;



This special tag is read only by IE. If an IE version less than 7 sees this code, it runs the CSS found inside the tag (which should be either a stylesheet or a link to a stylesheet.)



Using this technique, you can spend most of your effort on the compliant browsers and than handle inconsistencies in IE without wierd hacks or breaking things that work on the browsers that choose to follow standards.



EDIT --



I saw on your page that you do have a conditional comment, but it occurs BEFORE the main style sheet. Put it after the main stylesheet so the IE-specific stuff doesn't get overridden by the general style. And --- stay safe in Iraq, Bro...



Good luck!



IE and Firefox?ireland internet explorer



Yes, you need to switch to FireFox immidiately. IE has always had trouble viewing CSS unless you use specific code to allow it to be seen in IE.
Here's an article about it...
Welcome to the world of website development. You will always have problems getting your website to appear in the same in IE and Firefox, so you might as well get used to it. Start by validating it to make sure that it is standards compliant. After that, you just have to tweak it until you get it the way you want it.



http://validator.w3.org/
Good Luck James !

No comments:

Post a Comment

 
web hosting talk