Bug 108239

Summary: table cells rendered wrong when using precentage-width
Product: [Applications] konqueror Reporter: Andreas Pakulat <apaku>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Testcase for the Bugreport
new testcase

Description Andreas Pakulat 2005-06-27 21:11:38 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Debian testing/unstable Packages

Hi,

I found a bug in rendering of table cells using width-style with percentage.

I use a style sheet with a class definition like this:

td.myclass
{
        width: 33%;
}

And the HTML then uses

<td class="myclass"></td>
<td class="myclass"><a href="up">up</a></td>
<td class="myclass"><a href="next">next</a></td>
...

The problem now is, that those 3 cells within a row are not equally
wide. The first is extremely small, the other 2 are larger than 33%. Now
changing "%" to "px" in the style sheet resolves this! The same happen
when the last cell is empty and in the first is a link. 

The problem also does not appear when I have the following:

<table>
<tr>
<td>
<table><tr>< here are the 3 cells ></tr><tr><td><hr></td></tr></table>
</td>
</tr>
<tr>
<td><img ...></td>
<td><img ...></td>
<td><img ...></td>
</tr>
...
</table

here all 3 cells are equally wide. Opera, Galeon, Mozilla and Firefox
display the page correctly, konqueror is the only one that is "broken".

Andreas
Comment 1 Allan Sandfeld 2005-06-28 14:06:28 UTC
The bug report is currently useless, there is not enough information to reproduce, please provide a standard alone test-case or as a minimum a link to a page that fails.
Comment 2 Andreas Pakulat 2005-06-28 23:46:18 UTC
I'm sorry for not posting some more information immediately, but I had to check what specific part of my html is causing this...

Now I have a minimal example page set up here:

http://www.apaku.de/test_kfm_bug/testnavi.html

The stylesheet lies there too (testnavi.css). The first table is the one that's "wrong", the 3rd is the same table, except that the style-class is using "33px" instead of "33%". The 2nd table is probably only right because the images are all the same size (which is the case for the real site too, basically)

Also I noticed, removing the "wrapping" table is solving the problem, but showing a new one: The table get's bigger than the large image, this is shown in the last example.

Andreas
Comment 3 Allan Sandfeld 2006-06-17 17:43:36 UTC
I am sorry. The test case is no longer available. 

It would be easier if it was attached to the bug, so we can find it in the future.
Comment 4 Andreas Pakulat 2006-06-18 11:03:34 UTC
Created attachment 16673 [details]
Testcase for the Bugreport

Hi,

luckily I still have the files (good I seldom clean up my hdd). I attach a
tar.gz that contains the html, css and the 2 images.

Andreas
Comment 5 Andreas Pakulat 2006-06-18 11:17:03 UTC
Created attachment 16674 [details]
new testcase

Hi,

it seems my original testcase isn't "valid" anymore, at least here it doesn't
show anything wrong.

However the stripped-down version of the original page still shows a
misplacement. So I'm attaching a tar.gz containing all files needed.
Comment 6 Allan Sandfeld 2006-06-18 12:03:35 UTC
As I suspected ;)

I just fixed this yesterday

*** This bug has been marked as a duplicate of 67849 ***