Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on Inconsistencies between FF2 and IE7

Status
Not open for further replies.

SetoKaiba

Programmer
Jun 16, 2004
28
0
0
US
I've been coding in PHP too much lately, and have really fallen short on the HTML/CSS/JScript standards of today. My goal is to have a website that conforms to the HTML 4.01 Strict standard (I do not plan on using XML unless "AJAX" operations that do not return XML- ie. just simple HTML, are considered that). So forgive me if my questions turn out to be stupid.


That's a sample page. Now I ran a few validators on the page, and other than the marquee and some silly code, the display of the page shouldn't be affected too much.

However, the presentation of the page is different between IE7 and FF2. Previously, I started to despise IE and designed my site for Firefox primarily, and whatever doesn't come out nice in IE, too bad. However, now that I tried to get things towards the Strict standard, IE7 is the one that displays the arrangement more properly, but with some new issues.

First off, the buttons on the top, though absolute positioned, are off-position in FF2.

Second, there should be a pixel of space between the left image (the one that stretches to the bottom of the page) and the table on the right. This doesn't exist in FF2, but it does in IE. I tried seeing if the table stretched the encompassing DIV, however, the border actually appears OUTSIDE of the div (I tested this by setting the bgcolor of the DIV).

Third, in IE, the form fields are to extend as far as they go without breaking the page. They do this correctly in FF2, but not in IE7, where they are shorter than possible, and disappear on the right (weird).

I'm well aware of the inconsistencies between browsers, but am I to assume a perfectly conforming webpage, will not display the same in both IE and FF? Or is there a work around without having to write browser specific code (I -really- want to avoid this).

On a side note, the page I posted is part of my development site. Since I've been mucking around with alot of things, many features will not work, so I would recommend not browsing any further than that page. Everything, other than a few bits and pieces are original coding.
 
If your code is correct enough, you can make them look pretty spot-on in FF and IE. The best way to accomplish this is to code in FF first. IE is so bad about being standard compliant.

There are so many workarounds and "quirks" with IE, the best way to learn this is through experience.

<.
 
You can have perfectly valid (X)HTML and have page display vastly different in IE and FF. Do you have valid CSS is more of a question, since CSS is the one that will usually drive the layout. If everything validates, it usually comes down to being the case of overly complex way of achieving the layout. I have made some pretty heavy designs that look identically in IE7 and FF2 and with just a few tweaks even in IE6. So, it is not impossible, it is just that sometimes we start overcomplicating the matters.
 
You can have perfectly valid (X)HTML and have page display vastly different in IE and FF

Absolutely true. When I said

If your code is correct enough, you can make them look pretty spot-on in FF and IE.

correct enough was not referring to being valid XHTML it was basically referring to correct CSS. You can have valid CSS and have the display all messed up as well.


<.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top