← Back to team overview

zim-wiki team mailing list archive

Re: html export template: center images

 

Thank you both. Both are nice working solutions.

Cheers
Ramiro


On 4 December 2010 23:35, Bill Oldroyd <billoldroyd@xxxxxxxxx> wrote:
> Hi Ramiro,
>
> Could you do this by making two changes?. It would mean all images would be
> centred.
>
> In /usr/share/zim/Templates/Default.html add a CSS statement
>
>                   img.center { display: block; margin-left: auto;
> margin-right: auto; }
>
> and then in /usr/share/pyshred/zim/formats/html.py add class="center" the
> string used for translating the element tag for an image to html <img ... />
> :
>
>                   output.append('<img src="%s" class="center" alt="%s"%s>' %
> (src, text, opt))
>
> Providing control over where individual images should be placed is
> considerably more complicated.
>
> Bill
>
> On Fri, Dec 3, 2010 at 2:55 PM, Ramiro Magno <ramiro.magno@xxxxxxxxx> wrote:
>>
>> Hi
>>
>> is there a way of editing an html template such that all images get
>> automatically centered?
>>
>> Thanks
>> Ramiro
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~zim-wiki
>> Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~zim-wiki
>> More help   : https://help.launchpad.net/ListHelp
>
>
>
> --
> Bill Oldroyd
> Technical consultant for The European Library
>



References