Semantic grid system using margins