vimwiki

Css box model

On a website, everything is a box. And each box can contain boxes.

Add a border to see these boxes.

* {
  border: 2px solid red;    
}

There are several ways to manipulate the size of these boxes.

Block vs Inline

Padding and margin behave differently in block and inline. Usually you don’t put those attributes on an inline element.

Div vs Span

Div and span are not associated with a particular type of content (as oppose as link, paragraph…) They are just generic boxes that can contain anything.