Not sure i quite understand the question, but this might help.
I have created different <img> classes to use depending on what sort of image I'm using and the context in which they're being used, and have defined the max height in the style (same idea as you're after, just a different attribute). For example, I have some little icons that I include in the body so I don't want them to be too tall, so I've set the max-height for icons to be not much bigger than the text, and when I insert an icon I apply the class img.icon. I have other classes, for example img.FullScreen for when I want the picture to fill the page, and img.instructions when I'm including a graphic in a table where there are instructions in the other column of the table.
I'm a little confused as to why you are using the hash symbols (#). They are usually used to select an ID attribute, but that doesn't seem to be what you're doing.
The rest of the syntax looks like it *should* work.