Refactored figure.border.div handling.