From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: applying html classes to the "figure div on HTML export Date: Thu, 19 Sep 2013 16:10:57 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMkZ1-0003qe-EM for emacs-orgmode@gnu.org; Thu, 19 Sep 2013 16:11:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMkZ0-0000nz-3Y for emacs-orgmode@gnu.org; Thu, 19 Sep 2013 16:10:59 -0400 Received: from mail-ee0-x22b.google.com ([2a00:1450:4013:c00::22b]:61091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMkYz-0000nq-SO for emacs-orgmode@gnu.org; Thu, 19 Sep 2013 16:10:58 -0400 Received: by mail-ee0-f43.google.com with SMTP id e52so4441041eek.16 for ; Thu, 19 Sep 2013 13:10:57 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Christian Moe , Org Mode On Thu, Sep 19, 2013 at 3:05 PM, Christian Moe wrote: > > Matt Price writes: > >> Hi, >> >> Is there a way to apply an HTML class to the the
>> element which is generated around an image link on HTML export? > > I don't think there is...? > > What you /can/ do is wrap the image in a special block/custom div of your own, e.g. as > follows (the "myfloat" name is arbitrary): > > #+begin_myfloat > [[./picture.png]] > #+end_myfloat > > This results in: > >
> >
>

picture.png >

>
> >
> > Then you style the div.myfloat class with CSS. > > If I understand your problem correctly, you can also wrap all the images > that should go in a row in a single special block/custom div, e.g. > > #+begin_myfloat > [[./picture1.png]] > > [[./picture2.png]] > > [[./picture3.png]] > #+end_myfloat > > Then style the figure children of such divs with > > div.myfloat div.figure { ... } > > Does this work for you? ah, that's cool. I had just figured out another workaround, which was to add :PROPERTIES: :HTML_CONTAINER_CLASS: multi-image :END: to the containing headline, and then add .multi-image div.figure {float:left;} to the CSS. It seems to have worked for me so far. But the syntax you describe is easier and more flexible. I'll try it out soon thanks! Matt > > Yours, > Christian