div로 레이아웃을 잡아보려 하는데,, 불여우와 IE가 틀려요,, > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

div로 레이아웃을 잡아보려 하는데,, 불여우와 IE가 틀려요,, 정보

div로 레이아웃을 잡아보려 하는데,, 불여우와 IE가 틀려요,,

본문

<style type="text/css">
#head {width:500px; background-color:#CCC; margin-bottom:10px;}
#left {width:200px; float:left; background-color:#999; margin-bottom:10px;}
#main {width:300px; background-color:#333; margin-bottom:10px;}
#foot {width:500px; background-color:#666;}
</style>

<div id="head">1</div>
<div id="left">2</div>
<div id="main">3</div>
<div id="foot">4</div>

위와 같이 레이아웃을 잡아보려는데요,,
IE에선 'left' 와 'main' 이 가로로 떨어져서 나오지만, 불여우에선 겹쳐서 나와버리네요,,
'left'의 오른쪽에 div 를 두려면 왼쪽에 위치하는 div에 'float:left' 를 쓰면 되는거 아닌가요?
왜 불여우에선 안먹히지,, ㅡㅡ;

'left'와 'main'을 떨어트리려면 어떻게 해야하나요?

댓글 전체

<style type="text/css">
#head {width:500px; background-color:#CCC; margin-bottom:10px;}
#left {width:200px; float:left; background-color:#999; margin-bottom:10px;}
#main {width:300px; float:left; background-color:#333; margin-bottom:10px;}
#foot {width:500px; clear:left; background-color:#666;}
</style>

<div id="head">1</div>
<div id="left">2</div>
<div id="main">3</div>
<div id="foot">4</div>
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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