목록Front-End/CSS (14)
09009

CSS 노멀라이징, 라이브러리 * { margin: 0; padding: 0; } ul, li { list-style: none; } a { color: inherit; text-decoration: none; } .cell { float: left; } .row ::after { clear: both; display: block; content: ""; } 1. 헤더 제작 html 소스 코드 추가 로고가 들어가는 300 * 100 회색 박스 css 소스 코드 추가 .header { width: 1200px; height: 100px; background-color: red; margin: 0 auto; /* 중앙 정렬 */ } .header > .gray-box { width: 300px; height..

레이아웃 디자인 시안 화면 위의 레이아웃을 확인하면 5개의 div가 들어가야한다는 사실을 알 수 있다. 노멀라이징, 라이브러리는 레이아웃 작업을 시작하기 이전에 만들어야 한다. * { margin: 0; padding: 0; } ul, li { list-style: none; } a { color: inherit; text-decoration: none; } .cell { float: left; } .row ::after { clear: both; display: block; content: ""; } 1. 헤더 제작 margin: 0 auto; - 요소 중앙 정렬 (div를 화면 중앙에 정렬시킨다) text-align: center; - 글자를 중앙 정렬시킨다. 글자를 중앙 정렬시켰지만 글자가 요소의 ..

빨간 박스 (900, 200) 파란 박스 (300, 200) 레이아웃을 제작하기 이전에 가장 먼저 해야할 일은 CSS에서 노멀라이징 작업이다. 어떤 작업을 시작하던지 가장 먼저 해야할 일이다. 노멀라이징 작업 /* 노멀라이징 */ * { margin: 0; padding: 0; } ul, li { list-style: none; } a { color: inherit; text-decoration: none; } /* 라이브러리 */ .cell { float: left; } .row ::after { clear: both; display: block; content: ""; } 먼저 빨간색 박스와 파란색 박스를 만들어보자. 잘못된 방법 얼핏 보기에 위와 같이 원하는 형태로 박스를 배치한 것처럼 보이나 창의..