emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vikas Rawal <vikaslists@agrarianresearch.org>
To: Rick Frankel <rick@rickster.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: css classes to tables in html export
Date: Tue, 18 Feb 2014 18:08:50 +0100	[thread overview]
Message-ID: <20140218170850.GA30415@koalpara.local> (raw)
In-Reply-To: <20140217202213.GA11005@eyeBook>

Sorry, you forgot to reply to the mailing list. I am copying mailing
list in my reply. I hope it sticks to the thread.

My intent was to add classes, so that when I export to html, I get
something like this:

<Table class="table table-striped table-bordered table-condensed">

Vikas

On Mon, Feb 17, 2014 at 03:22:13PM -0500, Rick Frankel wrote:
> On Sun, Feb 16, 2014 at 10:31:04PM +0100, Vikas Rawal wrote:
> > How do I add custom css classes to tables while publishing my project?
> >
> 
> * Table attributes
> This
> #+BEGIN_EXAMPLE
> #+ATTR_HTML: :style background-color:grey :cellpadding 1em
> | a | b | c |
> |---+---+---|
> | 1 | 2 | 3 |
> #+END_EXAMPLE
> 
> results in this:
> 
> #+BEGIN_HTML
> <table border="2" cellspacing="0" cellpadding="1em" rules="groups" frame="hsides" style="background-color:grey">
> 
> <colgroup>
> <col  class="right" />
> 
> <col  class="right" />
> 
> <col  class="right" />
> </colgroup>
> <thead>
> <tr>
> <th scope="col" class="right">a</th>
> <th scope="col" class="right">b</th>
> <th scope="col" class="right">c</th>
> </tr>
> </thead>
> <tbody>
> <tr>
> <td class="right">1</td>
> <td class="right">2</td>
> <td class="right">3</td>
> </tr>
> </tbody>
> </table>
> </div>
> </div>
> #+END_HTML
> 
> 
> rick

  parent reply	other threads:[~2014-02-19 19:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-16 21:31 css classes to tables in html export Vikas Rawal
     [not found] ` <20140217202213.GA11005@eyeBook>
2014-02-18 17:08   ` Vikas Rawal [this message]
2014-02-19 21:07     ` Rick Frankel
2014-02-22 20:57       ` Vikas Rawal
2014-03-01  8:11 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140218170850.GA30415@koalpara.local \
    --to=vikaslists@agrarianresearch.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=rick@rickster.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).