From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Re: Aligning Columns in HTML Export Tables Date: Mon, 25 Oct 2010 23:39:33 +0200 Message-ID: <87lj5mc5pm.fsf@gmx.de> References: <878w1svl7y.fsf@gollum.intra.norang.ca> <53D6BE6F-C152-45DE-B01B-89D50B4848BC@gmail.com> <4CC54506.2070501@christianmoe.com> <21BA9B33-4ACD-4B43-9EF8-84765DA7EC2E@gmail.com> <4CC58271.6050005@christianmoe.com> <622824A9-23D9-416D-A6CA-F7499EC908AF@gmail.com> <4CC5E2E7.300@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=50357 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAUlh-0007nk-PO for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 17:39:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAUlf-0004M3-K0 for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 17:39:49 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:51551 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PAUlf-0004Li-5j for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 17:39:47 -0400 In-Reply-To: <4CC5E2E7.300@christianmoe.com> (Christian Moe's message of "Mon, 25 Oct 2010 22:04:55 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: mail@christianmoe.com Cc: Jeff Horn , Dan Davison , Bernt Hansen , Org-mode ml , Carsten Dominik , Baoqiu Cui Christian Moe writes: > Maybe someone with a browser where colgroups actually do work (Opera!) can check > > 1. if they only work with the align attribute, and not with CSS, and > > 2. whether they still work (take precedence) now that the individual cells are > aligned with CSS for their class. They _never_ took precedence, as soon as I used a style like this: /* My default for all td elements */ td { text-align:left; } The `td' style will alway be a "better" CSS-match than the col's style or class attribute, even then the col's align attribute. It's even the expected behaviour according to CSS standards since that what's the `C' in CSS means. I have to remove my favourite default style for td elements from my stylesheet to make that work in Opera, too. In current FF it does not work at all. Here's another test: CSS: --8<---------------cut here---------------start------------->8--- col.right { text-align:right;vertical-align:top;background-color:red; } col.left { text-align:left;vertical-align:top;background-color:green; } col.center { text-align:center;vertical-align:top;background-color:blue; } --8<---------------cut here---------------end--------------->8--- A table: --8<---------------cut here---------------start------------->8---
ABC
1bartext
12test300
9foo4
--8<---------------cut here---------------end--------------->8--- The only `style' that works that way is the `background-color'. In Opera and FF at least. Means, the `class' attribute in elements doesn't work very well (but '' might make sense with alternating colors).. Both, 'align' and the 'style' attribute will be overwritten by a default style for a element in the users stylesheet (some prefere center, some left alignment as the default). It's common practice to have `style' or `class' attribute in td elements. That's what classes are for in the end. Make HTML elements members of a group with certain properties. Why not jut go with it? Look at `magento's code, Drupal, whatever. They even use more those usefull classes, e.g. `first' and `last' for the first and last elements of lists. HTML elements without classes are hard to find. The reason is, that HTML is just a document structure. Classes (and IDs) make those elements live. "first" "last" "right" "left" "content" "footnote" "menu" "comment" "big" "small" "light" "dark" "pro" "contra" - classes make the difference. Plus 'class="right"' is easy to change in central place left entrirely to the user: the stylesheet. XML is not meant to avoid clutter. And if it was, something went terribly wrong, I guess :) Sebastian