From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Aligning Columns in HTML Export Tables Date: Tue, 26 Oct 2010 07:12:50 +0200 Message-ID: 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> <87lj5mc5pm.fsf@gmx.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=51365 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAcyx-0002or-K3 for emacs-orgmode@gnu.org; Tue, 26 Oct 2010 02:26:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAcyv-0000K7-Md for emacs-orgmode@gnu.org; Tue, 26 Oct 2010 02:26:03 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:50003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAcyv-0000K1-FB for emacs-orgmode@gnu.org; Tue, 26 Oct 2010 02:26:01 -0400 Received: by ewy25 with SMTP id 25so2207316ewy.0 for ; Mon, 25 Oct 2010 23:26:00 -0700 (PDT) In-Reply-To: <87lj5mc5pm.fsf@gmx.de> 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: Sebastian Rose Cc: Jeff Horn , mail@christianmoe.com, Dan Davison , Bernt Hansen , Org-mode ml , Baoqiu Cui OK, I think this change is now done. Thank you all for sharing your expertise! - Carsten On Oct 25, 2010, at 11:39 PM, Sebastian Rose wrote: > 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--- > > > class="right" /> > > > > > > > > > >
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