Correcting a mistake, centering an image

Hi,
I had this set up correctly and made the mistake of working on the wiki when I was half awake.
The class, if I remember correctly, looked something like this:

.center {
   block;
   right: 25%;
   left: 25%;
   width 50%;
}

and the call to the class was something like this:
[img class=“center” [Title 2.png]].

The image appears but it’s not centred.
Where have i screwed up, other than by doing things.
Thank you, again,
Parodocs

Have a closer look at: Floating Images HowTo the last section.
and https://tiddlywiki.com/#Images%20in%20WikiText

First, you need to fix your CSS class definition, like this:

.center {
   display: block;
   margin-right: auto;
   margin-left: auto;
   width: 50%;
}

and make sure the above definition is in a tiddler tagged with $:/tags/Stylesheet. Then, in any other tiddler, you can write:

[img class="center" [Title 2.png]]

enjoy,
-e