728x90 프로그래밍/CSS & HTML1 [CSS/HTML] position: fixed 중앙 정렬 position을 fixed로 주었을 경우 margin이나 justify-content, align-items의 중앙 정렬 방법이 적용되지 않는 문제가 발생 1. 좌측 > 우측 : 50% 이동(left: 50%) 2. 다시 왼쪽 50% 이동 1 2 3 4 5 header{ position: fixed; left: 50%; transform: translate(-50%, 0); } Colored by Color Scripter cs 2021. 7. 14. 이전 1 다음 728x90