Bug 118183 - width of <col>'s caculated incorrectly when css is used
Summary: width of <col>'s caculated incorrectly when css is used
Status: RESOLVED DUPLICATE of bug 67849
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-12 14:45 UTC by Philipp Sternberg
Modified: 2005-12-12 15:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
test case attached (485 bytes, text/html)
2005-12-12 15:05 UTC, Tommi Tervo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Sternberg 2005-12-12 14:45:08 UTC
Version:           3.4.3 (using KDE 3.4.3, Debian Package 4:3.4.3-2 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.14.2y

Hi all,

i experienced some problems using the <col> tag,

here the test case.

<head><style>
colgroup.navitop col#c1{width:20%;}
colgroup.navitop col#c2{width:136px;}
colgroup.navitop col#c3{width:2%;}
colgroup.navitop col#c5{width:2%;}
table.navitop{width:100%;padding:0px;table-layout:fixed;}
</style></head>

<body>
<table border="1" class="navitop">

<colgroup class="navitop"><col id="c1"><col id="c2"><col id="c3"><col id="c4"><col id="c5"></colgroup>

<tr><td>b</td><td>content</td><td>b</td><td>content</td><td>b</td></tr>

</table>
</body>
</html>

You should see a one line table with 5 columns. Unfortunatly the width of the columns given in percent is not calculated correctly. In a maximized browser windows using a horizontal resolution of 1024 px, the first column should be about 200 px width. However it actually is only about 45 px wide.

If the width is formatted directly into the tags like this: <colgroup class="navitop"><col style="width:20%"><col style="width:136px"><col style="width:2%"><col id="c4"><col style="width:2%"></colgroup> the width of a 20% wide cell is about 135px - still not much enough

If the code of the test case is used but colgroup is provided with a width attribute something weired happens: using <colgroup class="navitop" width="100%"> gives the same result as the directly formatted tags used above.
Using <colgroup class="navitop" width="1%"> (anything else is still test case code) you get a more or less correct width (about 201 px) for the first cell but not for the third and the fifth cell.
Using <colgroup class="navitop" width="0%"> brings you in trouble with cell three and five again.

As stated in http://www.w3.org/TR/html4/struct/tables.html#h-11.2.4.1 the width-attribute only provides a standard value for cells without a specified width (which is the case for cell four in the test case). Therefore changing the value should not influence the width of cells with a specified width.

Regards,

Philipp
Comment 1 Tommi Tervo 2005-12-12 15:05:44 UTC
Created attachment 13880 [details]
test case attached
Comment 2 Tommi Tervo 2005-12-12 15:11:44 UTC

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