Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 컨디셔널 렌더링
- SCSS
- typescript react
- github io
- fetch
- Git
- ngrok설치
- react
- createGlobalStyle
- react typescript
- icon
- API token
- react env
- CSS
- styled components
- There isn’t anything to compare
- input type=file
- github
- nextjs 설치
- getModifierState
- API 토큰
- ngrok실행
- next.js css
- nextjs
- dart 변수
- git lab
- rewrites
- npm styled-reset
- nextjs .env
- bootstrap
Archives
- Today
- Total
꾸준히 성장하는 개발자
float, position : absolute 위로 뜨는 개념 본문
float, position: absolute 을 주게 되면
inline-block이 된다 -> width가 없어진다, margin:auto 안먹힘 -> width : 100% 함께 써주기
이때 아래 콘텐트가 위로 올라가 숨을수 있는데 이때 아래 콘텐트에 clear를 사용하기
<float 말고 clear를 사용하는 이유>
1. float을 쓰면 그 아래 다음 콘텐트가 또 위로 올라가 숨을수 있다
2. 화면의 크기가 바뀌면 옆으로 올라갈수 있다
3. margin: auto를 쓸수 있다 (margin:auto쓸때 꼭 width값 넣어주기)
우선순위
position : absolute, fixed > float > margin:auto (+width, position:relative)
'오답노트 & 헷갈리는 것' 카테고리의 다른 글
CLI 명령어 정리 (0) | 2022.04.15 |
---|---|
가변형 높이를 가지는 방법 (0) | 2022.01.07 |
가운데 정렬 (0) | 2022.01.06 |
margin-top (0) | 2022.01.06 |
자식요소가 float되면 부모요소의 크기가 '0' 이 될때 (0) | 2022.01.06 |