2026, 새로운 도약을 시작합니다.

IE에서 중앙정렬(?)이 안먹혀요 채택완료

11년 전 조회 11,099
Copy


#main_header {width: 1000px;height:100px;margin: 0 auto;position: relative}


#title { position: absolute; left: 10px; top: 10px; }
#title img { height: 80px; }
#hd_button { position: absolute; width: 80px; right: 0; top: 0; }
#hd_button .trb { float: right; width: 35px; margin: 10px 0 0 10px; }
#hd_button .tlb { float: right; width: 35px; height: 35px; margin: 10px 0 0 0; }
#hd_button .brb { float: right; width: 35px; height: 35px; margin: 10px 0 0 10px; }
#hd_button .blb { float: right; width: 35px; height: 35px; margin: 10px 0 0 0; }






	
		
이 코드 인데요.. main_header이 중간에 가있어야 하는데 IE9이하 버전에서는 자꾸 왼쪽에 붙어있네요.. 해결방법을 알려주세요~!

답변 2개

채택된 답변
+20 포인트
style 에
body{text-align:center;}
#main_header {width: 1000px;height:100px;margin: 0 auto;position: relative; text-align:left;}
로 해주시면 됩니다~
width: 1000px; margin:0 auto; 로 감싸주는 div 에 text-align:left; 를 추가해야 틀어지지 않을거구요~
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

많은 도움이 되었습니다. 감사합니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고