728x90
CSS Margin attribute[top, left, bottom, right]
content, padding, border, margin 들의 관계
content 본문내용(접시에 담긴 음식과 같음)
padding content와 border사이의 여백(음식과 접시 바깥 끝과의 거리 )
border padding을 감싸고 있는 선 (접시의 바깥 끝)
선을 그리지 않을 수도 있이며 두께등 다양하게 그릴수 있다.
margin border와border의 여백(접시와 다른접시의 간격)
top
left
right
content
padding
border
margin
bottom
content edge
padding edge
border edge
margin edge
How to use Margin
순서를 잘 기억해야한다.단위는 px, cm, % 음수값도 지정 가능하다
margin-top 상단 여백
margin-right 우측 여백
margin-bottom 하단 여백
margin-left 좌측 여백
margin:5px 10px
15px 0px;
content
margin:
5px;
content
margin:5px 10px
0px;
content
margin:
5px 10px ;
content
'my_lesson > _CSS3' 카테고리의 다른 글
CSS list, padding, border, margin, a, position,curser (0) | 2015.04.09 |
---|---|
CSS font, text, background (0) | 2015.04.09 |
CSS Float & Clear attribute[none, right, left, both] (0) | 2015.03.23 |
CSS2 Z-index attribute[auto, number, initial] (0) | 2015.03.23 |
CSS Position attribute[static, relative, absolute, fixed] (0) | 2015.03.22 |
댓글