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 질문답변

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

+
제목 글쓴이 날짜 조회
19년 전 조회 1,270
19년 전 조회 1,613
19년 전 조회 1,635
19년 전 조회 1,172
19년 전 조회 1,543
19년 전 조회 1,562
19년 전 조회 1,648
19년 전 조회 1,151
19년 전 조회 1,517
19년 전 조회 1,836
19년 전 조회 1,575
19년 전 조회 1,703
19년 전 조회 1,124
19년 전 조회 1,199
19년 전 조회 1,439
19년 전 조회 1,126
19년 전 조회 1,535
19년 전 조회 1,581
19년 전 조회 1,443
19년 전 조회 1,585