On Wednesday, July 19, 2017 at 2:03:15 PM UTC-7, Vayu Asura wrote:
>
> I'm using tm-modal to create a full-res image display. So I call tm-modal 
> to display the image tiddler.
>
The thing is I can't center smaller images within the modal body, it is 
> always alingned left. Not sure which rule to edit and what to add for the 
> center alignment. 
>

The trick is to apply "margin:auto" to the img element... and it only takes 
ONE line of CSS!!

Simply create a tiddler, tagged with $:/tags/Stylesheet, containing:
.tc-modal-body img { display:block;margin:auto; }

Tested and verified:
1) open http://tiddlywiki.com/#Modals
2) press the "Open demo modal" button... note that MotovunJack image is NOT 
centered
3) create the stylesheet tiddler as described above
4) press the "Open demo modal" button again.... MotovunJack image is now 
centered.
Q.E.D

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas" (tm)
InsideTiddlyWiki: The Missing Manuals

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f75f7205-17f3-4402-b4b6-fd91f3c19b68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to