Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Nov 2002
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mozilla and ie differences?

    I am wondering exactly why these two browsers display the same HTML code differently. I have this code:

    <body>
    <table width="702" border="0" cellpadding="0" cellspacing="0" class="main">
    <td>
    <tr>
    <td width="702" height="55" valign="top" class="toplogo">

    <?php
    include ('topimg.php');
    ?>

    </td>
    </tr>
    <tr>
    <td height="115" valign="top" class="biglogo">

    <?php
    include ('bigimg.php');
    ?>

    </td>
    </tr>
    </td>
    </tr>
    <tr>
    <td height="22" valign="top">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="702" height="22" valign="top" class="nav">

    <?php
    include ('nav.php');
    ?>

    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td height="239" valign="top">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="218" rowspan="2" valign="top" class="pic_cell"> <img src="images/mainimg.jpg" width="218" height="237"></td>
    <td height="215" colspan="2" valign="top" class="news_cell">
    <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <em><strong>// News and Updates<br></strong></em></font>
    <div id="Layer6" style="position:absolute; left:226px; top:245px; width:468px; height:183px; z-index:6; overflow:auto;">

    <?php
    include ('news.php');
    ?>

    </div>
    </td>
    </tr>
    <tr>
    <td width="241" height="23" align="right" valign="middle" class="topwork_cell">
    <strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
    // <font color="#336699">Web_Work</font></strong>
    </td>
    <td width="241" height="23" align="right" valign="middle" class="topwork_cell">
    <strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
    // <font color="#336699">Print_Work</font></strong>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td height="175" valign="top">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="218" height="155" valign="top" class="cell"><!--DWLayoutEmptyCell-->&nbsp;</td>
    <td width="241" valign="top" class="work_cell"><!--DWLayoutEmptyCell-->&nbsp;</td>
    <td width="241" valign="top" class="work_cell"><!--DWLayoutEmptyCell-->&nbsp;</td>
    </tr>
    <tr>
    <td height="20" colspan="3" valign="top" class="footer">

    <?php
    include ('footer.php');
    ?>

    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>

    NOTE: disregard the PHP

    and it displays it as I want it to in IE 6. In Mozilla some of the tables are messed up (as in the heights are the wrong size and are misaligned). I don't understand... is this because of bad coding? or is it a "bad" browser. Ive always liked IE because it displays it how I envisioned it. I guess Im just wondering what causes the differences... code or browser. Thanks.
    - Nick

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Bad code. IE gets so many things wrong, it is silly. Though you didn't describe too well, it almost sounds like a well known issue that is documented here:
    http://devedge.netscape.com/viewsource/2002/img-table/

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Location
    self.location
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    "Bad code. IE gets so many things wrong, it is silly."

    JKD, your loathing of IE seeps out of every post. Coming from a moderator, statements like that just end up sounding so "immoderate" - know what I mean? It's an advocacy position.

    IE may implement non-standard behaviours - that doesn't mean the browser gets it "wrong", it's just not according to W3C standard. The W3C standards are as arbitrary as any non-standard - the only difference is that the standards have "legislative" support to back it up. The point is with IE he can realize his intention quite easily.

    "Ive always liked IE because it displays it how I envisioned it."

    Heh heh in IE you can do whatever you want to do using 3 or 4 completely different techniques. Almost always. The browser is that versatile. "Yeah, we know what you're trying to do. We've already considered this situation. No problem - here's what you asked for."

    But I'll bet - that in this issue at any rate - IE also accomodates the "standard" method of achieving the desired end.

    Whereas Mozilla offers only one way, and you have to figure out what that ONE way is, and the page tends to fall apart whenever you try other methods. "Duh, the rule book doesn't say anything about this situation... whaddo I do now?"

    ...

    My own immoderate contribution ;^]

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by realisis
    JKD, your loathing of IE seeps out of every post. Coming from a moderator, statements like that just end up sounding so "immoderate" - know what I mean? It's an advocacy position.
    I'm still human and entitled to an opinion. Removing the extra connotations I add, you'll find that everything I say about IE is factual. IE does a poor job with way too many things to be considered a decent, web standard authoring environment when compared to bases such as Mozilla or Opera (or even IE5/Mac!).

    I loathe IE/Win because the client-side portion of the web is capable of so much more, if only IE was not the predominant browser.

    Originally posted by realisis
    Heh heh in IE you can do whatever you want to do using 3 or 4 completely different techniques. Almost always. The browser is that versatile. "Yeah, we know what you're trying to do. We've already considered this situation. No problem - here's what you asked for."

    But I'll bet - that in this issue at any rate - IE also accomodates the "standard" method of achieving the desired end.
    How is this a good thing with multiple implementations inevitable? There is one clearly defined correct way of doing things. It is up to the author to follow them. If not, a correct web browser should throw fits at the page, instead of allowing the markup monstrosity to exist. Never will everyone use Windows, and it is not only unreasonable but also illogical to ask other browser makers to emulate IE's quirky and unpredictable rendering of malformed pages.

    As for IE accomadating the standard way, you'd be surprised at how often it doesn't.

    Originally posted by realisis

    Whereas Mozilla offers only one way, and you have to figure out what that ONE way is, and the page tends to fall apart whenever you try other methods. "Duh, the rule book doesn't say anything about this situation... whaddo I do now?"
    This "one way" you speak of is clearly defined for anyone willing to take 3 seconds and look at HTML/XHTML specifications. Plus, this one way is guarenteed to render properly in any browser claiming to be compliant, such as Moz, Opera, etc. Writing invalid messes only guarentees a future headache when future versions of IE won't even render it correctly.

    If the rule book doesn't say what to do, then do nothing. That is the proper course of action. How is a web browser supposed to guess the author's intentions without clear markup?
    "But IE guesses!"
    Not really, and it can be terribly unpredictable in what it does guess. It is much better just to throw parsing errors.

    I can give you multiple links/newsgroups postings that will rationalize even further why IE is in the wrong about guessing markup, but I've veered far enough from the topic of this post to defend myself, which has already slightly deviated with your reply. PM me if you want to continue this debate over web standards.

    All I have to say is that it is the author's responsibility to write correct code, and not the browser's to guess at invalid garbage.



    And nick_a, just ignore this bickering, it really isn't relevant to the problem at hand.
    If that link didn't help any, it would aid us to see a link of the page in action. There might be something important in the <?php?> includes that would affect this...

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There is one clearly defined correct way of doing things.
    No there isn't. Philosphically, there are an infinite number of ways of doing anything. More specifically, the standards do not, and cannot, provide a solution to every possible situation; or anything like. And, as you know, web standards are not clearly defined; there are huge areas of ambiguity.

    Sorry Jason - I have a tremendous amount of respect for you and your views, even if I disagree, but I feel compelled to caution on the dangers of self-restricting your approach to a given problem. Your statement that:

    If the rule book doesn't say what to do, then do nothing.
    Is just ridiculous. You surely wouldn't advocate that?
    Last edited by brothercake; 11-26-2002 at 05:06 PM.

  • #6
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by realisis
    [BWhereas Mozilla offers only one way, and you have to figure out what that ONE way is, and the page tends to fall apart whenever you try other methods.[/B]
    i have to agree with jkd, there should only be 1 way to do it, it only promotes proper web building, unfortunatly there ARE times when a problem will arise that there isnt an explanation to.
    in which case ie comes in handy

  • #7
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by brothercake
    Your statement that:

    my rulebook statement

    Is just ridiculous. You surely wouldn't advocate that?
    I took that in the context of rendering malformed markup, as suggested by realisis.

    A browser should never have to interpret invalid markup and render it accordingly to how the author wanted it. Mozilla does make an effort, but it is one that typically still makes obvious that the code is incorrect. This is why I like serving my XHTML as application/xhtml+xml or application/xml - if there is a markup problem, I get a big parser error instead of a rendered page. If all HTML parsers were to do the same, how fast do you think websites would adjust to using standards-compliant, validating markup?

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by jkd
    I took that in the context of rendering malformed markup, as suggested by realisis.
    Ah yes ... that'll me then; always looking for the general in the particular


    Originally posted by jkd
    This is why I like serving my XHTML as application/xhtml+xml or application/xml - if there is a markup problem, I get a big parser error instead of a rendered page.
    Now that's a good idea. How do you do that - is it a case of specifying that mime type for xhtml extensions, on the server?

  • #9
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    In my .htaccess file:

    AddType application/xhtml+xml xhtml

    Now, there is one inherent problem with serving XHTML as something other than text/html:

    Internet Explorer doesn't have a clue what it is. It'll prompt to download it. Now, I've been trying to get around this by scanning for MSIE in the user-agent, and using mod_rewrite to change the mime-type to text/html, but no luck yet:
    Conditionally rewriting mime-types

    You could always serve as application/xml or text/xml and have IE show the parse tree, instead of asking to download it, but that really isn't too much better .

  • #10
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Interesting; since it's not directly relevant to this thread I'm going to continue this in your other thread.

  • #11
    New Coder
    Join Date
    Nov 2002
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    And nick_a, just ignore this bickering, it really isn't relevant to the problem at hand.
    If that link didn't help any, it would aid us to see a link of the page in action. There might be something important in the <?php?> includes that would affect this...
    No its okay.... the link kind of fixed my problem. And dont worry about the bickering... I like to see different sides (even though some of it is over my head). Ive always thought that IE was better because I never had to mess around to get it too look right, as amatuerish as that sounds. I spent most of my time trying to get it too look right in other browsers (Moz, Opera) when it looked right in IE. I guess thats the basis of my preference.

    Oh and you guys can merge this thread with the other one if there is a similar discussion going on.

    - Nick


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •