centering small pictures
![](https://i.imgur.com/t1XUS1Kb.jpg)
Jennifer Wren
04 Apr 2023, 01:26I would really like to center my small pictures (with "show picture" preferably, but only preferably). Can it be done? Can anyone help me with the script for it?
![](https://i.imgur.com/8BcaZCyb.png)
DavyB
04 Apr 2023, 11:03Here's a bit of code from one of my games. You can probably work out what you need to change. I can't remember where I found this!
msg ("<img src='" + GetFileURL("movieposter.jpg") + "' style='display: block; margin-left: auto; margin-right: auto; width:300px;' />")
mrangel
04 Apr 2023, 14:10Or just:
PrintCentered ("{img:somefile.jpg}")
![](https://i.imgur.com/t1XUS1Kb.jpg)
Jennifer Wren
04 Apr 2023, 14:46Great! Thank you, both.
I tried the second, PrintCentered ("{img:somefile.jpg}"), because it looked easier. And it works.
The first idea looks like a lot of fun to play with. It could be useful in more than one way, but I am too impatient for it, at this point.
![](https://i.imgur.com/8BcaZCyb.png)
DavyB
04 Apr 2023, 21:18Yes, I should have said that I needed to scale the size of my image, which is the "300px" bit at the end. Perhaps the rest is connected with that as well? I really should make an effort to understand the markup language!