better handling for padding in a top/bottom or left/right configuration