Jump to content
xisto Community
Sign in to follow this  
malish

Firefox And Ie Preview

Recommended Posts

While I was making my web-site in front page, I've noticed that when preview it Internet Explorer it often looks very different from Mozzila's Firefox. I've got worried that my web-site might look good in Firefox but simultaneously show up messed up in Internet Explorer web browser. So. now I have to adjust HTML code for both browsers. Are there any suggestions of how to properly use html code to be able to view web pages in both web browsers the same? Maybe I need to use some special tags or something?

Share this post


Link to post
Share on other sites

I use php to take care of that. By showing one layout for Mozilla users and one layout for IE users. That way i wont have to worry much about if something looks bad in a certain browser or not.

This is the code i use:

<?phpif (!strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')){include("firefox/index.php");}if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')){include("ie/index.php");}?>

Share this post


Link to post
Share on other sites

If you stick to the HTML standards, your page should look OK in both. However, if you use any DHTML and/or CSS the best thing to do is view it in both browsers and fix the code that doesnt display right. There are ways to write CSS such that one property works only if IE is used since IE doesnt abide by all the standards like Firefox. On a side note, even if the page works fine in IE and Firefox you want to test it in Opera since it also is a popular browser and some things still look different even though they also abide by all the standards

Share this post


Link to post
Share on other sites

I use php to take care of that. By showing one layout for Mozilla users and one layout for IE users. That way i wont have to worry much about if something looks bad in a certain browser or not.

Doesn't that create twice as much work for you when you could really just get it to work right in both?
When designing websites, especially when using CSS, it's a good idea to get your site looking right in Firefox (which adheres more closely to the standards thatn IE) and then use various techniques/hacks to get it working right in IE. There are certain CSS selectors you can use to target certain rules at IE which other modern browsers ignore.

Share this post


Link to post
Share on other sites

Doesn't that create twice as much work for you when you could really just get it to work right in both?

Eh, it doesnt seem like extra work for me. The Firefox portion has little or no graphics involved, and coding the HTML isnt much of a hassle.

Share this post


Link to post
Share on other sites

I hate those scripts that detect what browser you are using and change the pages accordingly. Opera can be set to appear as Opera, IE or Netscape Navigator. A large number of people set it to IE otherwise you get webmasters who can't be bothered to code sites who just put a note up telling you to use IE.

Whenever I create a site I type all the code, run it though the W3C verifier and then put it into the browsers. Then I spend ages adapting my code so that regardless of which browser you use it will work. I also test my sites on Safari, just to make sure.

I advise you do the same, malish. Just run your code through the validator here and bring it up to standard, then fix the browsers that don't play fair.

Share this post


Link to post
Share on other sites

Ie and firefox is work with images trueyour design can have many images with good tabels if you manage tables good with nice html code you can make good privew in ie and firefox

Share this post


Link to post
Share on other sites

This best way, as many have already mentioned, is just to test your site in both browers. I've had bad experiences with IE looking enirely out of place while in Firefox, everything looks perfectly fine. But, if you think a little and play around, you should be able to create something that looks fine in both browsers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.