Problem with table width: mozilla renders it, IE makes up numbers

Discussion in 'HTML' started by spodosaurus, May 22, 2006.

  1. spodosaurus

    spodosaurus Guest

    Hi all,

    I'm trying to make a website with a fixed table width centred in the
    page. The width is specified using:

    <table width="779">

    This works fine in the latest version of mozilla, 1.7.13. However, in
    IE6 it renders as 955 pixels. (IE also ignores row height specifications
    half the time, but that's something I'll work on later) I want this
    website to be viewable with both mozilla and IE rather than look goofy
    in one but nice in the other.

    Can anyone explain to me why this is happenening and what I can do to
    make IE render the table at the fixed width I want?

    Regards,

    Ari


    --
    spammage trappage: remove the underscores to reply

    I'm going to die rather sooner than I'd like. I tried to protect my
    neighbours from crime, and became the victim of it. Complications in
    hospital following this resulted in a serious illness. I now need a bone
    marrow transplant. Many people around the world are waiting for a marrow
    transplant, too. Please volunteer to be a marrow donor:
    http://www.abmdr.org.au/
    http://www.marrow.org/
    spodosaurus, May 22, 2006
    #1
    1. Advertising

  2. spodosaurus

    dorayme Guest

    In article <e4rrcg$l2j$>,
    spodosaurus <spodosaurus@_yahoo_.com> wrote:

    > Hi all,
    >
    > I'm trying to make a website with a fixed table width centred in the
    > page. The width is specified using:
    >
    > <table width="779">
    >
    > This works fine in the latest version of mozilla, 1.7.13. However, in
    > IE6 it renders as 955 pixels. (IE also ignores row height specifications
    > half the time, but that's something I'll work on later) I want this
    > website to be viewable with both mozilla and IE rather than look goofy
    > in one but nice in the other.
    >
    > Can anyone explain to me why this is happenening and what I can do to
    > make IE render the table at the fixed width I want?
    >


    url?

    First, put style info for the table in css. If you want to do it
    inline, put style="width: 779px" instead of what you have about
    width. The "px" bit is important.

    Second, there is no normal way a browser will respect your
    widths for anything if you have content that can't normally and
    sensibly fit in there (like a landscape picture in a too small
    portrait box). Or if your widths for the cells in the row do not
    make mathematical sense.

    And surely other things too. Did I say url?

    --
    dorayme
    dorayme, May 22, 2006
    #2
    1. Advertising

  3. spodosaurus

    Andy Dingley Guest

    spodosaurus wrote:

    > I'm trying to make a website with a fixed table width centred in the
    > page.


    Don't. Get with the 21st century and do it right. Download yourself a
    CSS 3 columen template and use that instead of abusing tables (try
    glish or bluerobot)
    Andy Dingley, May 22, 2006
    #3
  4. Andy Dingley <> wrote:
    > > I'm trying to make a website with a fixed table width centred in the
    > > page.

    > Don't. Get with the 21st century and do it right. Download yourself a
    > CSS 3 columen template and use that instead of abusing tables (try
    > glish or bluerobot)


    This is assuming you have several years to wait for everyone to get a
    browser that CSS actually works correclty in....

    Otherwise, just use tables because it works....
    Travis Newbury, May 22, 2006
    #4
  5. spodosaurus

    Chaddy2222 Guest

    spodosaurus wrote:
    > Hi all,
    >
    > I'm trying to make a website with a fixed table width centred in the
    > page. The width is specified using:
    >
    > <table width="779">
    >
    > This works fine in the latest version of mozilla, 1.7.13. However, in
    > IE6 it renders as 955 pixels. (IE also ignores row height specifications
    > half the time, but that's something I'll work on later) I want this
    > website to be viewable with both mozilla and IE rather than look goofy
    > in one but nice in the other.
    >
    > Can anyone explain to me why this is happenening and what I can do to
    > make IE render the table at the fixed width I want?

    Place the width as a percentage rather then in PX units. Different
    browsers use different window sizes, as in the scroll bars in IE, or
    users may have a specific font size etc etc.
    So if you want to use a table to place the text and images of a page,
    then you should center it and then just give it a width of say 25% and
    you may not need to concern yourself with the hight, but you should set
    that as a % as well.
    This will mean your page will still look similar on a range of browsers
    but will be able to be changed, made more viewable by the visitor if he
    or she desirers.
    --
    Regards Chad. http://freewebdesign.cjb.cc
    Chaddy2222, May 22, 2006
    #5
  6. Travis Newbury wrote:
    > Andy Dingley <> wrote:
    >>> I'm trying to make a website with a fixed table width centred in the
    >>> page.

    >> Don't. Get with the 21st century and do it right. Download yourself a
    >> CSS 3 columen template and use that instead of abusing tables (try
    >> glish or bluerobot)

    >
    > This is assuming you have several years to wait for everyone to get a
    > browser that CSS actually works correclty in....
    >
    > Otherwise, just use tables because it works....
    >


    Sorry that is BS, OP *is* using a table and *still* having difficulties!
    Normally fixing the errors one can get very satisfactory results without
    relying on tables for layout in spite of IE.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, May 22, 2006
    #6
  7. spodosaurus

    Andy Dingley Guest

    Travis Newbury wrote:

    > This is assuming you have several years to wait for everyone to get a
    > browser that CSS actually works correclty in....


    More browsers support CSS usably than work with tables and fixed widths
    in pixels

    (think mobile devices)
    Andy Dingley, May 22, 2006
    #7
  8. Travis Newbury wrote:

    > Andy Dingley <> wrote:
    >>> I'm trying to make a website with a fixed table width centred in the
    >>> page.

    >> Don't. Get with the 21st century and do it right. Download yourself
    >> a CSS 3 columen template and use that instead of abusing tables
    >> (try glish or bluerobot)


    Here's a fairly good one from bluerobot, though it uses pixel
    dimensions, Verdana, and fixed font sizes.
    http://bluerobot.com/web/layouts/layout3.html

    Glish is now a bit long in the tooth.

    > This is assuming you have several years to wait for everyone to get a
    > browser that CSS actually works correclty in....


    You should upgrade from Netscape 3... :)

    This one works well in just about any browser.
    http://benmeadowcroft.com/webdev/csstemplates/3-column.html

    > Otherwise, just use tables because it works....


    Tables work fine for (um, have I heard this before?) tabular data.

    --
    -bts
    -Warning: I brake for lawn deer
    Beauregard T. Shagnasty, May 22, 2006
    #8
  9. spodosaurus <spodosaurus@_yahoo_.com> scripsit:

    > I'm trying to make a website with a fixed table width


    Stop trying that. Problem solved.

    > The width is specified using:
    >
    > <table width="779">


    That's a spectacularly bad choice. Did you ever check what it looks like in
    Print Preview, for example?

    > This works fine in the latest version of mozilla, 1.7.13. However, in
    > IE6 it renders as 955 pixels.


    So? You're not giving any relevant facts like the URL, so I give just the
    general answer: that's how things should be expected to be. Different
    browsers work differently. Do you realize what the width attribute _means_?
    It is the suggested minimum width. On the other hand, you have probably far
    too much stuff*) on the page, if the table requires, on some browser, that
    much width.

    *) I don't say "content", since much of the stuff is probably not content
    proper but noise and distraction.
    Jukka K. Korpela, May 22, 2006
    #9
  10. spodosaurus

    dorayme Guest

    In article <4471bbc6$0$3706$>,
    "Jonathan N. Little" <> wrote:

    > Travis Newbury wrote:
    > > Andy Dingley <> wrote:
    > >>> I'm trying to make a website with a fixed table width centred in the
    > >>> page.
    > >> Don't. Get with the 21st century and do it right. Download yourself a
    > >> CSS 3 columen template and use that instead of abusing tables (try
    > >> glish or bluerobot)

    > >
    > > This is assuming you have several years to wait for everyone to get a
    > > browser that CSS actually works correclty in....
    > >
    > > Otherwise, just use tables because it works....
    > >

    >
    > Sorry that is BS, OP *is* using a table and *still* having difficulties!
    > Normally fixing the errors one can get very satisfactory results without
    > relying on tables for layout in spite of IE.


    I think Travis meant that there is a smaller learning curve to
    getting a table layout to look good and consistent over all
    browsers. Surely he is right, eh young Jonathan?

    If you set out a table for reasonable aims for websites, along
    with the methods of achieving them, along further with the levels
    of difficulty, and then, for good measure make a set of the
    various possible graphs, remarks like Travis's come from looking
    at different graphs to what you are looking at.

    --
    dorayme
    dorayme, May 23, 2006
    #10
  11. spodosaurus

    dorayme Guest

    In article
    <>,
    "Andy Dingley <>"
    <> wrote:

    > Travis Newbury wrote:
    >
    > > This is assuming you have several years to wait for everyone to get a
    > > browser that CSS actually works correclty in....

    >
    > More browsers support CSS usably than work with tables and fixed widths
    > in pixels
    >
    > (think mobile devices)


    If this is true, it is because the way you are counting and
    restricting the meaning of "usable" and leaving out puzzling
    visual behaviours . If you count instances, the overwhelming
    number are on winboxes on IE on screens at least 14 inches
    diagonally.

    --
    dorayme
    dorayme, May 23, 2006
    #11
  12. dorayme wrote:
    > In article <4471bbc6$0$3706$>,
    > "Jonathan N. Little" <> wrote:
    >
    >> Travis Newbury wrote:


    >>> This is assuming you have several years to wait for everyone to get a
    >>> browser that CSS actually works correclty in....
    >>>
    >>> Otherwise, just use tables because it works....
    >>>

    >> Sorry that is BS, OP *is* using a table and *still* having difficulties!
    >> Normally fixing the errors one can get very satisfactory results without
    >> relying on tables for layout in spite of IE.

    >
    > I think Travis meant that there is a smaller learning curve to
    > getting a table layout to look good and consistent over all
    > browsers. Surely he is right, eh young Jonathan?


    Not sure when he states "have several years to wait for everyone to get
    a browser that CSS actually works correclty in" CSS works fro the most
    part even in IE. What could be simpler then:
    <h1>My Heading</h1>
    <h2>Subheading</h2>
    <p>Stuff about subheading....</p>
    <h2>Another subheading</h2>
    <p>More stuff about another subheading....</p>

    Young? Er, <blush> well thank you <rocking foot on toe>
    >
    > If you set out a table for reasonable aims for websites, along
    > with the methods of achieving them, along further with the levels
    > of difficulty, and then, for good measure make a set of the
    > various possible graphs, remarks like Travis's come from looking
    > at different graphs to what you are looking at.
    >



    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, May 23, 2006
    #12
  13. spodosaurus

    dorayme Guest

    In article <44724f76$0$3697$>,
    "Jonathan N. Little" <> wrote:

    > > I think Travis meant that there is a smaller learning curve to
    > > getting a table layout to look good and consistent over all
    > > browsers. Surely he is right, eh young Jonathan?

    >
    > Not sure when he states "have several years to wait for everyone to get
    > a browser that CSS actually works correclty in" CSS works fro the most
    > part even in IE. What could be simpler then:
    > <h1>My Heading</h1>
    > <h2>Subheading</h2>
    > <p>Stuff about subheading....</p>
    > <h2>Another subheading</h2>
    > <p>More stuff about another subheading....</p>


    He meant that most folk are not using very compliant browsers and
    the test is things that are not captured by these "school
    exercise" examples. You have probably lost sight of just how
    tricky it is for folk in real layout situations.

    --
    dorayme
    dorayme, May 23, 2006
    #13
  14. spodosaurus

    Toby Inkster Guest

    Jonathan N. Little wrote:

    > CSS works fro the most part even in IE. What could be simpler then:
    > <h1>My Heading</h1>
    > <h2>Subheading</h2>
    > <p>Stuff about subheading....</p>
    > <h2>Another subheading</h2>
    > <p>More stuff about another subheading....</p>


    Ummm... that's not CSS though.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, May 23, 2006
    #14
  15. Toby Inkster wrote:
    > Jonathan N. Little wrote:
    >
    >> CSS works fro the most part even in IE. What could be simpler then:
    >> <h1>My Heading</h1>
    >> <h2>Subheading</h2>
    >> <p>Stuff about subheading....</p>
    >> <h2>Another subheading</h2>
    >> <p>More stuff about another subheading....</p>

    >
    > Ummm... that's not CSS though.
    >


    No it is not, but my point was basic markup works and is easier than a
    table since many webpages with table layout still just do the "totem
    pole" layout of a page.

    [.....text.....]
    [image]
    [.....text.....]
    [image]
    [.....text.....]
    [image]
    [.....text.....]
    [image]
    [.....text.....]
    [image]


    Usually all on one page for a real scroll-wheel workout...


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, May 23, 2006
    #15
  16. spodosaurus

    Andy Dingley Guest

    dorayme wrote:

    > > More browsers support CSS usably than work with tables and fixed widths
    > > in pixels
    > >
    > > (think mobile devices)

    >
    > If this is true, it is because the way you are counting and
    > restricting the meaning of "usable" and leaving out puzzling
    > visual behaviours .


    By "usable" I'm assuming competent CSS coding giving a usable display
    (subject to some rendering variation)

    I accept that this isn't the case for typical sites in existence today,
    but it's achievable with the right skills - and that's my point.

    > If you count instances, the overwhelming
    > number are on winboxes on IE on screens at least 14 inches
    > diagonally.


    Those are an easy target for usable CSS. They're even a practical
    target for _accurate_ CSS rendering, for any halfway-competent
    professional web developer. IE 4 is a rarity these days - you can't
    seriously claim that it's a commercial problem to maintain
    pixel-accuracy back that far.
    Andy Dingley, May 23, 2006
    #16
  17. spodosaurus

    dorayme Guest

    In article
    <>,
    "Andy Dingley <>"
    <> wrote:

    > dorayme wrote:
    >
    > > > More browsers support CSS usably than work with tables and fixed widths
    > > > in pixels
    > > >
    > > > (think mobile devices)

    > >
    > > If this is true, it is because the way you are counting and
    > > restricting the meaning of "usable" and leaving out puzzling
    > > visual behaviours .

    >
    > By "usable" I'm assuming competent CSS coding giving a usable display
    > (subject to some rendering variation)
    >

    Yes, and by "competent CSS coding" you are building in all
    knowledge of how to make things work well in IE. This is rather
    different to the knowledge needed to make things work in better
    browsers. The same competency that is required to render a table
    in Firefox serves for IE. IE-Bug-Science deserves its own faculty.

    > I accept that this isn't the case for typical sites in existence today,
    > but it's achievable with the right skills - and that's my point.
    >
    > > If you count instances, the overwhelming
    > > number are on winboxes on IE on screens at least 14 inches
    > > diagonally.

    >
    > Those are an easy target for usable CSS. They're even a practical
    > target for _accurate_ CSS rendering, for any halfway-competent
    > professional web developer. IE 4 is a rarity these days - you can't
    > seriously claim that it's a commercial problem to maintain
    > pixel-accuracy back that far.


    Never mind IE 4, or pixel accuracy... lets talk non-crazy
    variations across browsers: on this standard, you should be able
    to see why folk make remarks like Travis's

    --
    dorayme
    dorayme, May 23, 2006
    #17
  18. spodosaurus

    Andy Dingley Guest

    On Wed, 24 May 2006 08:03:25 +1000, dorayme
    <> wrote:

    >Yes, and by "competent CSS coding" you are building in all
    >knowledge of how to make things work well in IE.


    No, I'm talking about how to write to the standard, not the sort of
    forensic pathology you need to understand all of IE's foibles.
    Even at its worst, a competent valid site viewed through IE is no worse
    than trying to view pixel-sized rigid tables from a re-sized window.
    Andy Dingley, May 24, 2006
    #18
  19. spodosaurus

    dorayme Guest

    In article <>,
    Andy Dingley <> wrote:

    > Even at its worst, a competent valid site viewed through IE is no worse
    > than trying to view pixel-sized rigid tables from a re-sized window.


    Well, this is interesting. let me assume you have not built too
    much into "competent". Is it true though? We need a set of
    cases... Viewing things that do crazy things in IE from standard
    CSS instructions makes people anxious, that they cannot see all
    of a table without scrolling is just an understandable bother...
    the one causes folk to reach for the valium, to bang their head a
    bit.. the other ... well, just another irritation like
    non-human-answering telephone systems.

    (God, this is time consuming... I know what I am doing...
    avoiding trying to figure out a way to get text and pics from a
    ..pub document given to me so that I can throw it into some sort
    of html shape. I am on a Mac and have not got Publisher and may
    have to get it etc...and put it on my old PC and so on...
    yawn...why don't clients send just text and pics?)

    --
    dorayme
    dorayme, May 24, 2006
    #19
    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. Chubby Arse
    Replies:
    0
    Views:
    545
    Chubby Arse
    Oct 6, 2005
  2. AndrewF
    Replies:
    1
    Views:
    743
    Bruce Barker
    Oct 10, 2005
  3. Sean Jorden
    Replies:
    1
    Views:
    584
    laurie
    Aug 19, 2003
  4. Chubby Arse

    Custom control renders table but doesn't resize at design time.

    Chubby Arse, Oct 6, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    169
    Chubby Arse
    Oct 6, 2005
  5. Matthew

    Panel control renders as table in NS 7

    Matthew, Feb 13, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    103
    Matthew
    Feb 13, 2004
Loading...

Share This Page