From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: Re: Aligning Columns in HTML Export Tables Date: Mon, 25 Oct 2010 10:51:18 +0200 Message-ID: <4CC54506.2070501@christianmoe.com> References: <878w1svl7y.fsf@gollum.intra.norang.ca> <53D6BE6F-C152-45DE-B01B-89D50B4848BC@gmail.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=60148 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAIkI-0004hD-PA for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 04:49:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAIkH-0004Ho-Ej for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 04:49:34 -0400 Received: from mars.hitrost.net ([91.185.193.39]:28392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAIkH-0004HD-4r for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 04:49:33 -0400 In-Reply-To: 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: Baoqiu Cui Cc: Bernt Hansen , Jeff Horn , Org-mode ml , Dan Davison , Carsten Dominik On 10/25/10 6:36 AM, Baoqiu Cui wrote: I am wondering if there > is any special reason to use "class" instead of "align". If not, can we > change the elisp code to use "align"? I believe the "align" attribute is slated for obsoletion in HTML5, on the grounds that it's better handled by CSS. http://www.w3.org/TR/html5/obsolete.html It's a reason to go with "class" instead. Not a compelling one, perhaps. My only strong opinion on this is that I absolutely agree with the choice not to set the "style" attribute locally on each table cell. But Sebastian Rose's request that prompted it, /could/ equally well be addressed with the "align" attribute: > How about this (line-wrapped for readability): > > > > 1 > bar > text > > > instead of > > > 1 > bar > text > > > ?? > > > Combined with the ways to add IDs and classes to tables, we could then style the > columns better. > > I would like to set this for right aligned tags as default: > > td.right { font-family:monospace;text-align:right; } Using the "align" attribute as follows, 1 bar text Sebastian could achieve the same with CSS like td[align="right"] { font-family: monospace;} In the same way one could even use CSS to override the alignment specified by the "align" attribute, if for whatever reason this seemed like a good idea... One slight advantage of the "align" attribute over "class" is that it doesn't require the default style to contain the extra verbiage Carsten mentioned: > I have now in the default style: > > td, th { vertical-align: top; } > th.right { text-align:right; } > th.left { text-align:left; } > th.center { text-align:center; } > td.right { text-align:right; } > td.left { text-align:left; } > td.center { text-align:center; } > > Is there a way to write this more compactly? Yours, Christian