[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: Aligning Columns in HTML Export Tables
From: |
Sebastian Rose |
Subject: |
Re: [Orgmode] Re: Aligning Columns in HTML Export Tables |
Date: |
Sat, 23 Oct 2010 21:28:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Carsten Dominik <address@hidden> 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; }
> 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?
Try:
(THERE'S A BUG: #+STYLE: lines are not wrapped in <style> tags anymore)
--8<---------------cut here---------------start------------->8---
#+STYLE: .right {margin-left:auto; margin-right:0px; text-align:right;}
#+STYLE: .left {margin-left:0px; margin-right:auto; text-align:left;}
#+STYLE: .center {margin-left:auto; margin-right:auto; text-align:center;}
* 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
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, (continued)
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Sebastian Rose, 2010/10/22
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Carsten Dominik, 2010/10/22
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Sebastian Rose, 2010/10/22
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Carsten Dominik, 2010/10/22
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Sebastian Rose, 2010/10/22
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Carsten Dominik, 2010/10/23
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Sebastian Rose, 2010/10/23
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Sebastian Rose, 2010/10/22
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Carsten Dominik, 2010/10/23
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Sebastian Rose, 2010/10/23
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables,
Sebastian Rose <=
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Carsten Dominik, 2010/10/25
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Giovanni Ridolfi, 2010/10/25
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Carsten Dominik, 2010/10/25
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Baoqiu Cui, 2010/10/25
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Christian Moe, 2010/10/25
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Carsten Dominik, 2010/10/25
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Christian Moe, 2010/10/25
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Carsten Dominik, 2010/10/25
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Sebastian Rose, 2010/10/25
- Re: [Orgmode] Re: Aligning Columns in HTML Export Tables, Christian Moe, 2010/10/25