Connecting Tech Pros Worldwide Forums | Help | Site Map

Problem with table width?

Olav Tollefsen
Guest
 
Posts: n/a
#1: Jul 20 '05
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?

Olav



Els
Guest
 
Posts: n/a
#2: Jul 20 '05

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
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Kris
Guest
 
Posts: n/a
#3: Jul 20 '05

re: Problem with table width?


In article <40fc23f2$1@news.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@xs4all.netherlands> (nl)
Olav Tollefsen
Guest
 
Posts: n/a
#4: Jul 20 '05

re: Problem with table width?


"Els" <els.aNOSPAM@tiscali.nl> wrote in message
news:Xns952BDE21A4DEEls@130.133.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


Els
Guest
 
Posts: n/a
#5: Jul 20 '05

re: Problem with table width?


Olav Tollefsen wrote:
[color=blue]
> "Els" <els.aNOSPAM@tiscali.nl> wrote in message
> news:Xns952BDE21A4DEEls@130.133.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.

http://tinyurl.com/4yu8l

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Alan J. Flavell
Guest
 
Posts: n/a
#6: Jul 20 '05

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.

Closed Thread