position은 원하는 위치에 원하는 요소를 그릴 수 있게 해줌
position: relative;position: relative 자체로는 별 의미가 없음top, right, bottom, left 값 만큼 이동.last {
position: relative;
top: 10px;
left: 10px;
}

position: absolute;position: relative; 를 부여함.parent {
position: relative;
width: 200px;
height: 50px;
border: 2px solid purple;
}
.child {
border: 2px solid purple;
position: absolute;
bottom: 0;
right: 10px;
}
** parent 요소 안에서 bottom에서 0만큼, right에서 10px만큼 떨어져 위치

position: fixed;fixed는 부모의 position: absolute;를 필요로 하지 않음div {
background-color: purple;
width: 100%;
height: 50px;
position: fixed;
top: 0;
}
p {
border: 1px solid black;
width: 50%;
height: 70px;
margin-top: 50px;
}
** 보라색 div가 화면의 top에서 0만큼 떨어진(위에 붙어있는) 상태로, 스크롤을 내려도 고정되어 있음

display: block/inline/inline-block;block한 영역을 차지하는 박스 형태를 가짐
기본적으로 width의 값은 100% > block 요소 옆에 다른 요소가 올 수 없음
width와 height 값 지정 가능
margin과 padding 지정 가능
대부분의 HTML element는 block
> <header>, <footer>, <p>, <li>, <table>, <div>, <h1> 등
inlinewidth가 100%가 아닌, 컨텐츠 영역만큼 잡힘 > inline 요소 옆에 다른 요소가 올 수 있음width와 height 값 지정 불가margin 좌우는 적용 가능, 위아래 적용 불가padding 좌우는 적용 가능, 위아래는 시각적으로는 표현되지만 주변, 부모 요소들에 영향X inline-blockinline과 block의 속성을 합침inline) 줄바꿈을 하지 않음 > 옆에 다른 요소가 올 수 있음block) width, height, margin, padding 모두 적용 가능floatfloat는 텍스트가 이미지를 감쌀 때 사용하기 위해 만들어짐block 요소에만 적용right, left, none이 있음display: inline-block;이 적용된 것과 동일div 2개 입력<div>p 가나다라마바사</div>
<div>p 1234567</div>

div에 float: left; 속성 입력*float를 이용해 첫 번째 div를 왼쪽으로 밀어서 위치시킴
<div class="float">p 가나다라마바사</div>
<div>p 1234567</div>
.float {
float: left;
}

div에 clear: left 추가 입력*두 번째 div가 float의 영향을 받지 않도록 clear 속성을 이용
<div class="float">p 가나다라마바사</div>
<div class="clear">p 1234567</div>
.float {
float: left;
}
.clear {
clear: left;
}
