emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Lawrence <richard.lawrence@berkeley.edu>
To: Andreas Reuleaux <rx@a-rx.info>, emacs-orgmode@gnu.org
Subject: Re: aligning images, html attributes ignored when exporting to html (longish, sorry)
Date: Mon, 23 Apr 2018 11:27:05 -0700	[thread overview]
Message-ID: <874lk1dbie.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87vackuusr.fsf@a-rx.info>

Hi Andreas,
 
Andreas Reuleaux <rx@a-rx.info> writes:

> Leaving out the double quotes may be comfortable, but I am not 
> sure if this was a good idea: makes it difficult to see which 
> parts belong to the style, and where the alt attribute starts: 
> 
>  #+attr_html: :style float: right; border: 1px solid brown; :alt 
>  foo  
> this would have been easier to read I think 
> 
>   #+attr_html: :style "float: right; border: 1px solid brown;" 
>   :alt "foo"

This would be a good place to use a CSS class.

In your CSS file (or between <style> tags that you put in the HTML 
header), you can write something like this:

.right { float: right; border: 1px solid brown; }

And then for the individual right-floated images, you can write:

#+ATTR_HTML: :class right :alt foo

Using :class here is both more readable and more maintainable: 
there's just one place to update your style code if you want to 
change how the right-floated images display.

Hope that helps!

-- 
Best,
Richard

  reply	other threads:[~2018-04-23 18:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-21 15:14 aligning images, html attributes ignored when exporting to html (longish, sorry) Andreas Reuleaux
2018-04-21 21:13 ` Andreas Reuleaux
2018-04-23 18:27   ` Richard Lawrence [this message]
2018-04-23 19:04     ` Andreas Reuleaux
2018-04-22  8:25 ` Nicolas Goaziou
2018-04-22 12:03   ` Andreas Reuleaux
2018-04-26 23:34   ` 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=874lk1dbie.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me \
    --to=richard.lawrence@berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=rx@a-rx.info \
    /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).