s

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'을 떨어트리려면 어떻게 해야하나요?

댓글 2개

<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>
답변 감사합니당,,^^
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
06-07-18 조회 1,703
06-07-18 조회 1,893
06-07-18 조회 1,570
06-07-18 조회 1,277
06-07-18 조회 1,244
06-07-18 조회 1,351
06-07-18 조회 1,438
06-07-18 조회 1,456
06-07-18 조회 1,328
06-07-18 조회 1,677
06-07-18 조회 1,732
06-07-18 조회 1,244
06-07-18 조회 1,607
06-07-18 조회 1,622
06-07-18 조회 1,722
06-07-18 조회 1,218
06-07-18 조회 1,582
06-07-18 조회 1,909
06-07-18 조회 1,650
06-07-18 조회 1,791