|
From: | Xin Shi |
Subject: | Re: [Orgmode] Alternate Table Row Colors |
Date: | Mon, 15 Jun 2009 13:08:51 -0400 |
Hi Russell,
Thanks for your posting!
Unfortunately, this is quite a new feature for CSS 3, which is not supported by the Firefox 3. It would be great if the org-mode can just add the class attribute in the <tr>.
XinOn Sun, Jun 14, 2009 at 3:11 PM, Russell Adams <address@hidden> wrote:
Not that I'm a CSS expert, but it appears you could do this without
changing how Org outputs tables by adding this styling to your CSS.
http://www.zorked.com/css/alternating-table-rows-using-css-only/
Quote:
tr:nth-child(odd) {
background-color: #CCCCCC;
}
tr:nth-child(even) {
background-color: #6699FF;
}
Good luck! If you make an example, please post it!
> _______________________________________________
On Sun, Jun 14, 2009 at 03:00:15PM -0400, Xin Shi wrote:
> Hello Experts,
>
> I use org-mode to produce a lot of big tables with numbers in them. When I
> present these tables by HTML, I found it's hard to keep track which row it
> is. I'm wondering if it's possible to implement additional class attribute
> to the <tr>, such as:
>
>
> <table class="sample">
> <tr class="d0"><td>One</td><td>Fish</td></tr>
> <tr class="d1"><td>Two</td><td>Fish</td></tr>
> <tr class="d0"><td>Red</td><td>Fish</td></tr>
> <tr class="d1"><td>Blue</td><td>Fish</td></tr>
> </table>
>
> So, that in the CSS file, it'll be easier to implement the color:
>
> <style type="text/css">
> table.sample {
> border: 6px inset #8B8378;
> -moz-border-radius: 6px;
> }
> table.sample td {
> border: 1px solid black;
> padding: 0.2em 2ex 0.2em 2ex;
> color: black;
> }
> table.sample tr.d0 td {
> background-color: #FCF6CF;
> }
> table.sample tr.d1 td {
> background-color: #FEFEF2;
> }
> </style>
>
> I borrowed idea from this article:
> http://www.somacon.com/p338.php
>
> Thanks!
>
> Xin
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
------------------------------------------------------------------
Russell Adams address@hidden
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Prev in Thread] | Current Thread | [Next in Thread] |