From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Aligning Columns in HTML Export Tables Date: Mon, 25 Oct 2010 08:48:06 +0200 Message-ID: <4D0BED2E-2674-4EA7-8B85-E7A9179D9CDD@gmail.com> References: <878w1svl7y.fsf@gollum.intra.norang.ca> <53D6BE6F-C152-45DE-B01B-89D50B4848BC@gmail.com> <87iq0u5v9v.fsf@gmx.de> <87mxq6jpkr.fsf@gmx.de> <87mxq6hvcj.fsf@gmx.de> <7848164C-BDDA-4791-838B-2611670F4F46@gmail.com> <87zku4emk5.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=56801 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAI66-00041s-UC for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 04:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAI65-0003q8-7h for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 04:08:02 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:56015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAI65-0003pt-0g for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 04:08:01 -0400 Received: by mail-ew0-f41.google.com with SMTP id 25so1443443ewy.0 for ; Mon, 25 Oct 2010 01:08:00 -0700 (PDT) In-Reply-To: <87zku4emk5.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: Org-mode ml On Oct 23, 2010, at 9:28 PM, Sebastian Rose wrote: > Carsten Dominik writes: >> 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; } I am actually using right now: th.right { text-align:center; } th.left { text-align:center; } th.center { text-align:center; } because is seem right to me that a table header is centrally aligned even if the fields are lift or right aligned. Does anyone know enough rules of style to tell me if this is the right way, of if header fields are supposed to have the same alignments as the data fields? >> td.right { text-align:right; } >> td.left { text-align:left; } >> td.center { text-align:center; } >> >> Is there a way to write this more compactly? >> >> - Carsten > > > But this is, what I often use: > > /* Aligns block elements, too: */ > .right {margin-left:auto; margin-right:0px; text-align:right;} > .left {margin-left:0px; margin-right:auto; text-align:left;} > .center {margin-left:auto; margin-right:auto; text-align:center;} > > These are CSS classes I use frequently. It works for all HTML > elements > AND aligns table to the right in all important browsers. I first > thought "OK, we can do this ourselves per stylesheet", but why not > offer > this little goodie out-of-the-box? So you are suggesting I should add these to the style sheet. Sounds fine to me, with the limitation that it might interfere with commonly used classes? I prefer to have at least the th.left/right/center in addition due to the fact that I think I like centered headers. > > Try: > > > (THERE'S A BUG: #+STYLE: lines are not wrapped in - Carsten > > * Tables > > #+ATTR_HTML: class="left" > | a | b | c | > |---+---+---| > | 1 | 2 | 3 | > > #+ATTR_HTML: class="center" > | a | b | c | > |---+---+---| > | 1 | 2 | 3 | > > #+ATTR_HTML: class="right" > | a | b | c | > |---+---+---| > | 1 | 2 | 3 | > --8<---------------cut here---------------end--------------->8--- > > > > Sebastian