[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] aligning images, html attributes ignored when exporting to html
From: |
Andreas Reuleaux |
Subject: |
Re: [O] aligning images, html attributes ignored when exporting to html (longish, sorry) |
Date: |
Mon, 23 Apr 2018 20:04:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Ah, yes, you are right, thanks. Have used class before,
but start out with style usually when experimenting.
Thanks,
Andreas
Richard Lawrence <address@hidden> writes:
> 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!