Forum Moderators: open

Message Too Old, No Replies

How can you code a site for both IE and Firefox?

IE & Firefox

         

chad1027

7:08 pm on May 21, 2006 (gmt 0)

10+ Year Member



I just finished the basic set up of my site, it works fine in IE, but funky in FireFox. I wrote it using php include and div

Any hints, tips, tricks to make the site look okay in both browsers?

[edited by: tedster at 9:05 pm (utc) on May 21, 2006]

tedster

9:13 pm on May 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1) Use a full DTD, so that browsers are rendering in Standards Mode and not Quirks Mode [webmasterworld.com].

2) Validate your mark-up through the W3C [validator.w3.org] -- trying to fix any rendering problem when there are errors in the mark-up can drive you MAD, because what you see depends on error-correction routines in the browsers, rather than the exectution of standards.

3) Set all margins and padding to 0 at the top of your css, so the varying browser defaults are zeroed out. Then intentionally declare any non-zero padding and margins for whatever elements you use.

And finally, although your case is further along, it usually takes a lot less work to monitor your page in FireFox as you develop -- and then find IE tweaks as needed. This is because FireFox is much closer to standards and IE has many peculiarities that you might unknowingly bake into your recipe.