[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] css classes to tables in html export
From: |
Rick Frankel |
Subject: |
Re: [O] css classes to tables in html export |
Date: |
Wed, 19 Feb 2014 16:07:44 -0500 |
User-agent: |
Mutt/1.5.22 (2013-10-16) |
On Tue, Feb 18, 2014 at 06:08:50PM +0100, Vikas Rawal wrote:
> 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">
So, use the class attribute.
#+ATTR_HTML: :class table table-striped table-bordered table-condensed
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"
class="table table-striped table-bordered table-condensed">
>
> 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