The custom CSS class goes on the outer container div, it works as intended. The div with modulecontent class is not the outer div.
To remove the borders and padding first you need to figure out which CSS selector is adding the border and padding using Firebug, then you can devise a way to remove it using more specific CSS that uses the outer custom css class as part of the selector.
Hope that helps,
Joe