display 속성은 요소의 이러한 default 속성을 바꿀 수 있다.
block
: width, height 을 바꿀 수 있다. (그러나 한줄을 모두 차지하는 건 똑같다)inline
: width, height 속성을 지정해도 변화가 없다. margin 은 left/right 에만 적용된다.inline-block
: width, height 를 갖지만 한 줄을 모두 차지하지는 않는다.boxmodel 은 block/inline 요소 모두에게 해당된다. 단, width, height 는 block 에만 유효.
/* shorthand syntax */
padding: 2px /* same on all sides */
padding: 2px 10px; /* top & bottom, right & left */
padding: 2px 10px 5px; /* top, right & left, bottom */