250x250
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
- python flask
- 가성비 다이버
- Git
- 코더가 아닌 개발자
- sne573
- 컨테이너 지우기
- 시계 줄질
- 야근
- 1일1커밋
- 전체지우기
- html/css 완강
- python scrap
- js이론
- 다짐
- python scrap title
- 손목난민
- 리팩터링
- 재택
- 떱텐
- eventsourcing
- mn나토
- python
- html/css
- pbcopy
- 주우재시계
- github
- CSS
- 5600B
- Docker
- 클론코딩
Archives
- Today
- Total
발전하는 나를 기록하기 위해
일요일 스터디 / css실습 position fixed, margin 본문
728x90
상단바, 그 밑에 바 하나 더 position : fixed로 설정하고 a 태그 집어 넣었는데
위치 설정이 내가 생각한대로 안됨.
a 태그에서 margin-top 설정했는데 두번 째 바와 같이 margin 설정이 들어갔다.
fixed 설정 주면 처음 지정한 위치 고정일텐데 왜...?
그래서 a 태그를 div로 감싸주고 진행했다.
<div id="friends-display">
< a id="friends-display__link">
<i class="fas fa-info-circle fa-sm"></i>
Friends' Names Display
<i class="fas fa-chevron-right fa-xs"></i>
</a>
</div>
#friends-display {
display: flex;
justify-content: center;
top: 90px;
width: 100%;
position: fixed;
background-color: #fafafa;
padding: 15px 0px;
}
#friends-display__link {
padding: 20px, 0px;
font-size: 16px;
}
감싼 div태그에서 위치 고정시켜주고
flex와 justify-content : center; 설정주었는데 가운데로 안왔다.
뭘 놓쳤나 고민해보니 width 안줬다.
width : 100% 설정....
이것 때문에 1시간이나 날렸다.
'개발' 카테고리의 다른 글
| 배탈 이슈 토요일 반 죽음상태 (0) | 2022.01.09 |
|---|---|
| 운영 서버설정 반영 오류 / css(display, position, box-sizing) (0) | 2022.01.07 |
| naver 검색 api 한글깨짐 현상 (0) | 2022.01.06 |
| mysql 그룹별 상위 n개 출력하기 (0) | 2022.01.05 |
| 놀래서 재택 (0) | 2022.01.04 |