Centre an img in a div!

Hey ya …

nb. ! without <center> tags please ! :wink:

I have a div set to a certain width. It has rounded edges.
Inside the div I want a picture to sit inside it centered.

As I am repeating the use of this div, The pictures I will put inside them will either be portrait or landscape … which is why the importance of them sitting centered.

Finally - i wish the image to have rounded edges too.

For some reason … i cant get it to work …
Am using firefox, so no wors about code for other browsers.

this is the html setup

<div id="gallery">
<div id="frame">
<img src="my.jpg" class="crop" />
</div>
</div>

my CSS

#gallery{
margin:0 auto;
}
#frame{
background:red;
-moz-border-radius:7px; 
padding:10px;
}
.crop{
margin:0 auto;
-moz-border-radius:7px; 
}

alas - nothothings really happening… is my code really all that bad??

thanks