Bug 106812 - text-align inheritance problem in strict (xhtml-1.0) mode
Summary: text-align inheritance problem in strict (xhtml-1.0) mode
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 3.4.1
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-05 01:03 UTC by Yves Glodt
Modified: 2006-08-23 04:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase (478 bytes, text/html)
2005-06-05 01:03 UTC, Yves Glodt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yves Glodt 2005-06-05 01:03:06 UTC
Version:           3.4.1 (using KDE KDE 3.4.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Hi, I think I found a small bug...

I have a document with this doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Now if you have this piece of css:

	body {
		text-align:center;
	}
	td,th {
		width:200px;
		background-color:#887;
	}

<td> will not be centered. This seems to be a bug, Firefox and
Opera 8 both center the data, and it seems logical as (IIRC)
the rule should be inherited from the <body>

Strangely, if I remove the xhtml doctype, none of the 3 browsers centers it, so maybe it's an xhtml compliance bug...
I'll attach a small testcase to save some typing.
Comment 1 Yves Glodt 2005-06-05 01:03:57 UTC
Created attachment 11329 [details]
Testcase
Comment 2 Thiago Macieira 2005-06-08 03:59:51 UTC
I'm not a CSS expert, but I agree with your assessment. And I can reproduce it (trunk 414026).
Comment 3 Germain Garand 2006-08-23 04:21:08 UTC
SVN commit 576076 by ggarand:

text-align of tables should only be reset in quirk mode.

BUG: 106812


 M  +0 -1      html4.css  
 M  +1 -0      quirks.css  


--- branches/KDE/3.5/kdelibs/khtml/css/html4.css #576075:576076
@@ -170,7 +170,6 @@
 table {
 	display: table;
 	border-collapse: separate;
-	text-align: -khtml-auto;
 	border-spacing: 2px;
         -khtml-flow-mode: -khtml-around-floats;
         box-sizing: border-box;
--- branches/KDE/3.5/kdelibs/khtml/css/quirks.css #576075:576076
@@ -24,6 +24,7 @@
     color: -khtml-text;
     font-size: medium;
     empty-cells: hide;
+    text-align: -khtml-auto;
 }
 
 LAYER {