centering small pictures

I 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?


Here'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;' />")

Or just:

PrintCentered ("{img:somefile.jpg}")

Great! 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.


Yes, 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!


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums