On 25 Feb 2008 Paul Vigay wrote:

> In a dim and distant universe <[EMAIL PROTECTED]>,
>    Richard Porter <[EMAIL PROTECTED]> enlightened us thusly:
>> However there is a general problem with NetSurf's handling of tables
>> containing unclosed elements. Just try to view the SWI list on the OS3
>> PRM CD.

I should have said the Basic manual index page.

>> It will stagger table cells to the right instead of placing them
>> in a column as intended. Also mixing up percentage widths and absolute
>> widths is a nightmare to sort out unless you're very careful.

> I'm not sure if there's an official (W3C?) recommendation, but I'd
> have said that absolute widths should precedence over relative widths.

> My logic for this is that if you want something say roughly a 1/3rd of
> the page you could use a table/column width of say "30%", which is
> more of a 'I want it to look narrower than the rest', whereas if you
> specifically want a navigation bar or something to be a precise size
> you'd use something like <td width=200> or something.

> Thus, exact sizes are generally chosen because that's exactly what you
> want, whereas percentage/relative sizes are chosen because you're not
> /that/ fussed but you want it roughly that size relative to the
> browser window or rest of the page etc.

Yes, I agree with you entirely. But the problem occurs when get a 
conflict between the percentages, the fixed widths and the width of 
the window. For example you might have a window which is 800px wide, 
and a page containing a table of width 100% i.e. 800px, with a row of 
three cells of widths 200, 50% and 30%. This implies that 200 is 
equivalent to 20% so the table width should be 1000 and not 800. I 
haven't even considered borders, margins, cellpadding and cellspacing!

What is the browser meant to do? It could scale everything down by 
80%, it could just scale down the 50% and 30% columns, or it could 
extend the page outside the window so you have to scroll it.

Then what happens if you have subsequent rows which conflict with the 
first row or which impose further constraints, such as a fixed width 
cell in column 3? What happens if you have an image inside a table 
cell with an explicit width that exceeds the implicit or explicit 
column width? I think that absolute image widths take precedence over 
column or table widths.

-- 
 _
|_|. _   Richard Porter               http://www.minijem.plus.com/
|\_||_                                mailto:[EMAIL PROTECTED]

Reply via email to