emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] aligning images, html attributes ignored when exporting to html


From: Richard Lawrence
Subject: Re: [O] aligning images, html attributes ignored when exporting to html (longish, sorry)
Date: Mon, 23 Apr 2018 11:27:05 -0700

Hi Andreas,

Andreas Reuleaux <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]