imagelogo

Durkheim's Blog


DBC Phase 0


Week 2 Technical Blog

January 4, 2015

Over the course of week 2, Phase 0, at Dev Bootcamp, CSS proved to be my biggest obstacle. As a review, I thought it'd be useful to go over Margin, Border, and Padding and discuss how they differ. Before launching into a definition of each, I'll explain CSS box modeling and how they fit into the concept.

In the CSS box model, each element generates rectangular boxes with a content area that features optional surrounding areas. The content can be text or an image and around that content is a Border. In CSS, you can set the size (thickness), style (solid, dashed, etc.), and color of the border. In CSS, users have the option to set the space between the border and content via Padding, as well as the space around the border/element.

These three properties are incredibly useful for setting up elements spacially on a webpage. Admittedly, I struggled with these concepts at first, but by the end of week 2, the material became much clearer.

|