Problem with table width?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Olav Tollefsen

    Problem with table width?

    Take a look at this page:



    Why is the left table with the text "Menu" not 160 pixels as stated in the
    HTML code?

    Olav


  • Els

    #2
    Re: Problem with table width?

    Olav Tollefsen wrote:
    [color=blue]
    > Take a look at this page:
    >
    > http://www.webinnovation.no/test/test.htm
    >
    > Why is the left table with the text "Menu" not 160 pixels
    > as stated in the HTML code?[/color]

    The whole table is 785, and 160 is 1/4.906 of that, roughly 1
    fifth. What I see in my browser is your 'menu' being 1 fifth of
    the width of the whole table. Can't be bothered to count pixels
    though. Too small.

    --
    Els
    Blog and other pages, mostly outdated.

    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -

    Comment

    • Kris

      #3
      Re: Problem with table width?

      In article <40fc23f2$1@new s.broadpark.no> , "Olav Tollefsen" <x@y.com>
      wrote:
      [color=blue]
      > http://www.webinnovation.no/test/test.htm
      >
      > Why is the left table[/color]

      Tablecell.
      [color=blue]
      > with the text "Menu" not 160 pixels as stated in the
      > HTML code?[/color]

      Here it is, using Safari. Why do you use tables for layout when CSS can
      do a better job?

      --
      Kris
      <kristiaan@xs4a ll.netherlands> (nl)

      Comment

      • Olav Tollefsen

        #4
        Re: Problem with table width?

        "Els" <els.aNOSPAM@ti scali.nl> wrote in message
        news:Xns952BDE2 1A4DEEls@130.13 3.1.4...[color=blue]
        > Olav Tollefsen wrote:
        >[color=green]
        > > Take a look at this page:
        > >
        > > http://www.webinnovation.no/test/test.htm
        > >
        > > Why is the left table with the text "Menu" not 160 pixels
        > > as stated in the HTML code?[/color]
        >
        > The whole table is 785, and 160 is 1/4.906 of that, roughly 1
        > fifth. What I see in my browser is your 'menu' being 1 fifth of
        > the width of the whole table. Can't be bothered to count pixels
        > though. Too small.[/color]

        Which browser did you test with? It doesn't look OK in IE 6.0. It looks OK
        in Mozilla 1.7.1.

        Why the big difference for this simple code?

        Olav


        Comment

        • Els

          #5
          Re: Problem with table width?

          Olav Tollefsen wrote:
          [color=blue]
          > "Els" <els.aNOSPAM@ti scali.nl> wrote in message
          > news:Xns952BDE2 1A4DEEls@130.13 3.1.4...[color=green]
          >> Olav Tollefsen wrote:
          >>[color=darkred]
          >> > Take a look at this page:
          >> >
          >> > http://www.webinnovation.no/test/test.htm
          >> >
          >> > Why is the left table with the text "Menu" not 160
          >> > pixels as stated in the HTML code?[/color]
          >>
          >> The whole table is 785, and 160 is 1/4.906 of that,
          >> roughly 1 fifth. What I see in my browser is your 'menu'
          >> being 1 fifth of the width of the whole table. Can't be
          >> bothered to count pixels though. Too small.[/color]
          >
          > Which browser did you test with? It doesn't look OK in IE
          > 6.0. It looks OK in Mozilla 1.7.1.[/color]

          Firebird. I see the difference now, yes.
          [color=blue]
          > Why the big difference for this simple code?[/color]

          Maybe it's because you used XHTML doctype, which according to
          the Specs and the Validator doesn't support the html width
          attribute.



          --
          Els
          Blog and other pages, mostly outdated.

          Sonhos vem. Sonhos vão. O resto é imperfeito.
          - Renato Russo -

          Comment

          • Alan J. Flavell

            #6
            Re: Problem with table width?

            On Mon, 19 Jul 2004, Olav Tollefsen wrote:
            [color=blue]
            > Why the big difference for this simple code?[/color]

            Looks like an old-fashioned problem for old-fashioned design
            techniques. IE has historically done strange things when one mixes
            HTML and CSS sizing and units (pixels, percent, implicit).

            Why are you declaring this to be XHTML/1.1, when it isn't? - the HTML
            validator reports errors, and the CSS validator refuses to even look
            at the CSS because of the XHTML errors. It's generally considered a
            courtesy on this group to fix syntax errors for oneself before asking
            the group for advice on problems.

            I would recommend taking away HTML sizing (leave non-CSS-capable
            client agents to do their own table sizing - it usually comes out well
            enough), and do any CSS sizing in consistent units (usually I'd
            recommend percent, unless you have specifically pixel-sized objects to
            accommodate).

            Even better, don't use tables for layout.

            Comment

            Working...