emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Christian Moe <mail@christianmoe.com>, Org Mode <emacs-orgmode@gnu.org>
Subject: Re: applying html classes to the "figure div on HTML export
Date: Thu, 19 Sep 2013 16:10:57 -0400	[thread overview]
Message-ID: <CAN_Dec9U4NTm0PATJjruuRLGr6S=wRY1_4j9zgFM9XtfcdetTw@mail.gmail.com> (raw)
In-Reply-To: <m2bo3oiqd3.fsf@uio.no>

On Thu, Sep 19, 2013 at 3:05 PM, Christian Moe <mail@christianmoe.com> wrote:
>
> Matt Price writes:
>
>> Hi,
>>
>> Is there a way to apply an HTML class to the the <div class="figure">
>> 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:
>
>   <div class="myfloat">
>
>   <div class="figure">
>   <p><img src="./picture.png" alt="picture.png" />
>   </p>
>   </div>
>
>   </div>
>
> 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

  parent reply	other threads:[~2013-09-19 20:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 18:14 applying html classes to the "figure div on HTML export Matt Price
     [not found] ` <m2bo3oiqd3.fsf@uio.no>
2013-09-19 20:10   ` Matt Price [this message]
2013-09-19 21:06     ` Christian Moe

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='CAN_Dec9U4NTm0PATJjruuRLGr6S=wRY1_4j9zgFM9XtfcdetTw@mail.gmail.com' \
    --to=moptop99@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@christianmoe.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).