float 가운데 배치 질문요.

float 가운데 배치 질문요.

QA

float 가운데 배치 질문요.

본문

3731206609_1588579306.0777.png

#header {position:fixed; width:100%; margin:auto; top:0; background-color:#fff; z-index:10000; border-bottom:1px solid #2f2f2f;}
#header-title {float:left; width:1000px; padding-top:10px; text-align:center;}
#menuArea {float:left; padding-bottom:10px;}
#menuArea .top-member-menu {font-size:12px; font-weight:bold;}
#menuArea .top-menu {font-size:12px; font-weight:bold;}

현재는 header-title 과 menuArea에 float:left를 해서 왼쪽으로 치우쳐져 있는데 위 이미지처럼 만들고 싶은데은데 어떻게 수정을 해야하나요?

이 질문에 댓글 쓰기 :

답변 1

가운데로 고정시키는 방법은 여러가지가 있습니다.

저 위의 경우 저라면, 두 자식을 감싸는 부모요소를 하나 만든 후

display:talble; margin:0 auto; 로 편하게 잡을거 같습니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 6
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT