The Piece of Code

[CSS] margin, pdding 순서

fonch 2015. 2. 3. 23:59


> margin, padding 순서


margin 순서...

쓸때마다 이게 왜 이렇게 헤깔리는지 ㅠㅠ


4개 다 쓸 경우 시계 방향으로 [위 오른쪽 아래 왼쪽]

3개 쓸 경우 [위 오른쪽,왼쪽 아래]

2개 쓸 경우 [위,아래 오른쪽,왼쪽]

1개 쓸 경우 [위,오른쪽,아래,왼쪽]


pdding 도 똑같습니다.


 

Css


margin: 25px 50px 75px 100px;


- top margin is 25px

- right margin is 50px

- bottom margin is 75px

- left margin is 100px



margin: 25px 50px 75px;


- top margin is 25px

- right and left margins are 50px

- bottom margin is 75px


margin: 25px 50px;


- top and bottom margins are 25px

- right and left margins are 50px


margin: 25px;


- all four margins are 25px

출처: http://www.w3schools.com/css/css_margin.asp



'The Piece of Code' 카테고리의 다른 글

[C#] Image Resize - ASP.NET  (0) 2016.02.10
[C#] Image Resize - Winfrom  (0) 2016.02.10
[javascript] 모바일 기기 구분하기  (0) 2013.02.28
[C#] StripHtml  (1) 2013.01.20
[Windows 8, C#] MessageDialog  (0) 2013.01.20