Works in IE but not in Opera or Firefox

Discussion in 'HTML' started by John Dalberg, Nov 2, 2004.

  1. John Dalberg

    John Dalberg Guest

    The html below displays correctly in IE but not in Opera nor Firefox. The
    problem is with the style attribute for tbody tag. If I remove it, the
    display is fine. So my question is what's wrong with the style in tbody..
    isn't that supported?

    John Dalberg

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>

    <table cellspacing="0" cellpadding="0" border="1" id="MainContent"
    width="478">
    <tr> <td style="padding:3; ">
    blah blah blah
    <form action="do.asp" method="post" >
    <table border="1" bordercolor="#00FF33" cellpadding="2"
    cellspacing="0" width="100%">
    <tr>
    <td colspan="4" bgcolor="#43aae3" align="center"> <span
    style="color:#FFFFFF; text-align:center;"> <b>Contact
    Detail</b></span></td>
    </tr>
    <tr>
    <td><img src="images/ClearPixel.gif" width="91" border="0"
    height="1"></td>
    <td><img src="images/ClearPixel.gif" width="176" border="0"
    height="1"></td>
    <td><img src="images/ClearPixel.gif" width="66" border="0"
    height="1"></td>
    <td><img src="images/ClearPixel.gif" width="145" border="0"
    height="1"></td>
    </tr>
    <tr>
    <td align="right">Domain Name:</td>
    <td align="left"><input type="text" name="DomainName" size="22"
    maxlength="50" tabindex="1"></td>
    <td align="right">Email Address:</td>
    <td align="left"><input type="text" name="Email" size="18"
    maxlength="50" tabindex="2"></td>
    </tr>
    <tbody style="display:block; ">
    <tr>
    <td align="right">First Name:</td>
    <td align="left"> <input type="text" name="FirstName"
    size="22" maxlength="50" tabindex="3"></td>
    <td align="right">Last Name:</td>
    <td align="left"><input type="text" name="LastName" size="18"
    maxlength="50" tabindex="4"></td>
    </tr>
    </tbody>
    </table>


    </body>
    </html>
     
    John Dalberg, Nov 2, 2004
    #1
    1. Advertising

  2. John Dalberg

    SpaceGirl Guest

    John Dalberg wrote:

    > The html below displays correctly in IE but not in Opera nor Firefox. The
    > problem is with the style attribute for tbody tag. If I remove it, the
    > display is fine. So my question is what's wrong with the style in tbody..
    > isn't that supported?
    >
    > John Dalberg
    >


    <snip>

    padding:3; Three what? Miles? Inches? Frogs Legs? You must specify units.

    padding:3px;

    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Nov 2, 2004
    #2
    1. Advertising

  3. John Dalberg

    brucie Guest

    In alt.html John Dalberg said:

    > The html below displays correctly in IE but not in Opera nor Firefox.


    you mean it displays how you think it should in IE, not displays
    correctly.

    please supply a URL in future.

    --
    the facts and opinions expressed by brucies
    l i t t l e v o i c e s
    are not necessarily the same as those held by brucie.
     
    brucie, Nov 2, 2004
    #3
  4. John Dalberg

    Mark Parnell Guest

    On Tue, 2 Nov 2004 15:24:21 -0800, John Dalberg <>
    declared in alt.html:

    > The html below displays correctly in IE but not in Opera nor Firefox. The
    > problem is with the style attribute for tbody tag. If I remove it, the
    > display is fine. So my question is what's wrong with the style in tbody..
    > isn't that supported?


    Yes, when you use it correctly.

    That code is far more complicated than necessary, even if (ab)using
    tables for layout. You should also take a trip to the validator.

    > <td style="padding:3; ">


    Better break out those hobnobs again, Toby. (Hint: the unit is required
    when specifying a non-zero value for padding.)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Nov 2, 2004
    #4
  5. John Dalberg

    C A Upsdell Guest

    "John Dalberg" <> wrote in message
    news:...
    > The html below displays correctly in IE but not in Opera nor Firefox. The
    > problem is with the style attribute for tbody tag. If I remove it, the
    > display is fine. So my question is what's wrong with the style in tbody..
    > isn't that supported?


    Besides forgetting to specify units for the padding, you use the attribute
    BORDERCOLOR in one of your tables. this attribute is IE proprietary, not in
    the standards, so what do you expect other browsers to do with it?

    Suggestion: code to the standards, validate your code, make sure it works
    with standards-compliant browsers first, and then see what you have to do to
    work around IE's inadequacies.
     
    C A Upsdell, Nov 2, 2004
    #5
  6. On Tue, 2 Nov 2004 15:24:21 -0800, John Dalberg <>
    wrote:

    [snip]

    > <tbody style="display:block; ">


    That's a bad idea for reasons I gave in your last thread.

    [snip]

    Mike

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.
     
    Michael Winter, Nov 2, 2004
    #6
  7. C A Upsdell wrote:
    > Besides forgetting to specify units for the padding, you use the attribute
    > BORDERCOLOR in one of your tables. this attribute is IE proprietary, not in
    > the standards, so what do you expect other browsers to do with it?


    FWIW, Gecko (newer versions, at least) unfortunately supports it.
     
    Leif K-Brooks, Nov 2, 2004
    #7
  8. John Dalberg

    C A Upsdell Guest

    "Leif K-Brooks" <> wrote in message
    news:...
    >C A Upsdell wrote:
    >> Besides forgetting to specify units for the padding, you use the
    >> attribute BORDERCOLOR in one of your tables. this attribute is IE
    >> proprietary, not in the standards, so what do you expect other browsers
    >> to do with it?

    >
    > FWIW, Gecko (newer versions, at least) unfortunately supports it.


    But can you COUNT on Gecko supporting a non-standard feature in the future?

    Also, does Gecko support it in standards mode?
     
    C A Upsdell, Nov 3, 2004
    #8
  9. John Dalberg

    rf Guest

    John Dalberg wrote

    > <tbody style="display:block; ">


    If this is following on from your last thread then you do not want to apply
    display: block to a tbody. I suspect this takes it out of the table and
    makes it onto a seperate block, yet still within the table, which the
    browser has to error correct. As you have found browsers error correct
    differently.

    Give it whatever.display = "none" to disappear it but when you want it
    visible again give it whatever.display = "". This "rubs out" the display:
    none.

    --
    Cheers
    Richard.
     
    rf, Nov 3, 2004
    #9
  10. John Dalberg

    John Dalberg Guest

    On Wed, 3 Nov 2004 09:31:50 +1000, brucie wrote:

    > In alt.html John Dalberg said:
    >
    >> The html below displays correctly in IE but not in Opera nor Firefox.

    >
    > you mean it displays how you think it should in IE, not displays
    > correctly.
    >
    > please supply a URL in future.


    It displays correctly and how I think it should in IE.
    I supplied the full html. You can simply copy and paste it.

    John Dalberg
     
    John Dalberg, Nov 3, 2004
    #10
  11. John Dalberg

    John Dalberg Guest

    On Tue, 2 Nov 2004 18:40:00 -0500, C A Upsdell wrote:

    > "John Dalberg" <> wrote in message
    > news:...
    >> The html below displays correctly in IE but not in Opera nor Firefox. The
    >> problem is with the style attribute for tbody tag. If I remove it, the
    >> display is fine. So my question is what's wrong with the style in tbody..
    >> isn't that supported?

    >
    > Besides forgetting to specify units for the padding, you use the attribute
    > BORDERCOLOR in one of your tables. this attribute is IE proprietary, not in
    > the standards, so what do you expect other browsers to do with it?


    I expect them to ignore it like they should.

    John
     
    John Dalberg, Nov 3, 2004
    #11
  12. John Dalberg

    rf Guest

    John Dalberg wrote:
    > On Wed, 3 Nov 2004 09:31:50 +1000, brucie wrote:


    > > please supply a URL in future.

    >
    > It displays correctly and how I think it should in IE.


    But it does not in other browsers. This indicates that you have a bug in
    your HTML. IE takes great pains to try to interpret what you *meant*, not
    what you *said*. Other browsers simply give up and take you at your words.

    BTW see my other post in this thread :)

    > I supplied the full html. You can simply copy and paste it.


    So before we help you for free we have to do this bit of work. Well, the
    last bloke whose question I answered simply posted a link. All I had to do
    to view the problem was to click on it.

    With yours I have to open an editor, open your post, copy from your post,
    paste in my editor, save the file somewhere on my local file system, fire up
    a broser, labouriously point that browser to the saved file.

    Is that as easy as clicking a link?

    Besides whilst you have supplied the HTML and CSS You have not supplied the
    images. Unlikely in this case but I have seen sites fall apart because of
    things that ARE NOT in the HTML or CSS but included.

    Plus, how do we know what you have supplied there is exactly the same as the
    file you have. Consider the word wrap the news client introduces. Some
    layout problems are caused by incorrect wrapping.

    All things considered I think you lose on this one :)

    --
    Cheers
    Richard.
     
    rf, Nov 3, 2004
    #12
  13. John Dalberg

    Mark Parnell Guest

    On Tue, 2 Nov 2004 17:31:25 -0800, John Dalberg <>
    declared in alt.html:

    > I expect them to ignore it like they should.


    So what _is_ the "correct" behaviour that IE is exhibiting that the
    other browsers aren't?

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Nov 3, 2004
    #13
  14. John Dalberg

    brucie Guest

    In alt.html John Dalberg said:

    >> you mean it displays how you think it should in IE, not displays
    >> correctly.


    > It displays correctly


    no it doesn't

    > and how I think it should in IE.


    displaying how you think it should and displaying correctly are not the
    same thing.

    > I supplied the full html. You can simply copy and paste it.


    santa wont be visiting you this year


    --
    the facts and opinions expressed by brucies
    l i t t l e v o i c e s
    are not necessarily the same as those held by brucie.
     
    brucie, Nov 3, 2004
    #14
  15. John Dalberg

    John Dalberg Guest

    On Wed, 3 Nov 2004 10:34:49 +1100, Mark Parnell wrote:

    > On Tue, 2 Nov 2004 15:24:21 -0800, John Dalberg <>
    > declared in alt.html:
    >
    >> The html below displays correctly in IE but not in Opera nor Firefox. The
    >> problem is with the style attribute for tbody tag. If I remove it, the
    >> display is fine. So my question is what's wrong with the style in tbody..
    >> isn't that supported?

    >
    > Yes, when you use it correctly.
    >
    > That code is far more complicated than necessary, even if (ab)using
    > tables for layout. You should also take a trip to the validator.
    >
    >> <td style="padding:3; ">

    >
    > Better break out those hobnobs again, Toby. (Hint: the unit is required
    > when specifying a non-zero value for padding.)


    It's not complicated. Just two simple tables one nested in the other. Maybe
    there are better ways using css only but my method is not *wrong*.
    Now it html and css validates with 0 errors and still the problems
    persists.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <table cellspacing="0" cellpadding="0" border="1" id="MainContent"
    width="478">
    <tr>
    <td style="padding:3px; "> blah blah blah
    <form action="do.asp" method="post" >
    <table border="1" cellpadding="2"cellspacing="0" width="100%">
    <tr>
    <td colspan="4" bgcolor="#43aae3" align="center"> <span
    style="color:#FFFFFF; text-align:center;"> <b>Contact
    Detail</b></span></td>
    </tr>
    <tr>
    <td><img src="images/ClearPixel.gif" alt ="" width="91"
    border="0"
    height="1"></td>
    <td><img src="images/ClearPixel.gif" alt ="" width="176"
    border="0"
    height="1"></td>
    <td><img src="images/ClearPixel.gif" alt ="" width="66"
    border="0"
    height="1"></td>
    <td><img src="images/ClearPixel.gif" alt ="" width="145"
    border="0"
    height="1"></td>
    </tr>
    <tr>
    <td align="right">Domain Name:</td>
    <td align="left"><input type="text" name="DomainName" size="22"
    maxlength="50" tabindex="1"></td>
    <td align="right">Email Address:</td>
    <td align="left"><input type="text" name="Email" size="18"
    maxlength="50" tabindex="2"></td>
    </tr>
    <tbody style="display: block ">
    <tr>
    <td align="right">First Name:</td>
    <td align="left"> <input type="text" name="FirstName"
    size="22" maxlength="50" tabindex="3"></td>
    <td align="right">Last Name:</td>
    <td align="left"><input type="text" name="LastName" size="18"
    maxlength="50" tabindex="4"></td>
    </tr>
    </tbody>
    </table>
    </form></td>
    </tr>
    </table>
    </body>
    </html>
     
    John Dalberg, Nov 3, 2004
    #15
  16. John Dalberg

    John Dalberg Guest

    On Wed, 3 Nov 2004 12:53:04 +1100, Mark Parnell wrote:

    > On Tue, 2 Nov 2004 17:31:25 -0800, John Dalberg <>
    > declared in alt.html:
    >
    >> I expect them to ignore it like they should.

    >
    > So what _is_ the "correct" behaviour that IE is exhibiting that the
    > other browsers aren't?


    In IE each row has 4 columns and they display correctly as I expect. In
    Firefox, the first column with the 'domain name' label is very wide and it
    shows on top of the third column of the row beneath it. If I take the style
    off from tbody, it displays correctly in Firefox. I just wanted to know why
    the style:display is messing things up.

    Sorry I don't have a site to show this. I will try tomorrow.

    John Dalberg
     
    John Dalberg, Nov 3, 2004
    #16
  17. John Dalberg

    rf Guest

    John Dalberg wrote

    > It's not complicated. Just two simple tables one nested in the other.

    Maybe
    > there are better ways using css only but my method is not *wrong*.


    <bangs brucies head on desk />

    Yes, *it is wrong*. You are applying display: block to an element where that
    does not make sense. Table bodies can *not* be block level element. It does
    not pull an error because it *is* syntactally correct. However it is most
    certainly semantically incorrect. It's like saying body {display: inline;}.
    Syntax is correct but what do you think a browser would do with it?

    Just why do you want to turn a <tbody> element into a block level element in
    the first place?

    At the very least you should be using display: table-row-group (as per the
    CSS specification, chapter 17).

    Ideally you should omit the display property altogether and let the default
    style sheet (appendix A in the spec) override the default display: inline
    with display: table-row-group.

    <snip code which I will *not* copy/paste as there is no need to, the error
    sticks out like dogs balls>

    --
    Cheers
    Richard.
     
    rf, Nov 3, 2004
    #17
  18. John Dalberg

    Mark Parnell Guest

    On Tue, 2 Nov 2004 18:32:06 -0800, John Dalberg <>
    declared in alt.html:

    > It's not complicated.


    Certainly looks it from here.

    > Now it html and css validates with 0 errors and still the problems
    > persists.


    You still haven't told us what you believe the actual problem to be -
    only that IE displays it differently (whatever that means) to other
    browsers.

    Others have already told you that the problem is probably due to the
    display:block. If, after removing that, the problem still occurs,
    explain exactly what isn't working the way you expect, and post a URL
    displaying the behaviour in question.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Nov 3, 2004
    #18
  19. John Dalberg

    Neal Guest

    John Dalberg wrote:

    Commenting solely on the subject line:

    It's wise to assume that whenever IE does it and no one else does, you've
    screwed it up.
     
    Neal, Nov 3, 2004
    #19
  20. John Dalberg

    John Dalberg Guest

    On Wed, 3 Nov 2004 12:11:31 +1000, brucie wrote:

    > In alt.html John Dalberg said:
    >
    >>> you mean it displays how you think it should in IE, not displays
    >>> correctly.

    >
    >> It displays correctly

    >
    > no it doesn't


    Why do you think it doesn't display correcty and how do you think it should
    display correctly?

    >
    >> and how I think it should in IE.

    >
    > displaying how you think it should and displaying correctly are not the
    > same thing.


    It's displaying how it should display correctly.


    >
    >> I supplied the full html. You can simply copy and paste it.

    >
    > santa wont be visiting you this year


    good.

    John Dalberg
     
    John Dalberg, Nov 3, 2004
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob
    Replies:
    24
    Views:
    1,569
  2. Jeff
    Replies:
    3
    Views:
    1,142
  3. patrickkellogg
    Replies:
    3
    Views:
    170
  4. Bob
    Replies:
    3
    Views:
    119
  5. Replies:
    2
    Views:
    125
    Peter Michaux
    Jun 6, 2007
Loading...

Share This Page