레이아웃 백그라운드!
렁찬
지금 div로 레이아웃 잡는데요wrap 안에 모든 컨텐츠들이 배경색이 #eee 이어야 하거든요 이바깥은 모두 기본흰색인데
wrap 안에 컨테츠들이 늘어나든 줄어들든 #eee로 나오게 해야하는데
css 에서 뭘잘못했을까요??div id=container이부분에 css 배경색을 넣어줬는데계속 left와 content 부분에 내용을 넣으면 배경색이 안먹히네요
답변기다리겠습니다 ㅜㅜ
div id=wrap!-- header --div id=header div class=logo
/div div class=gnb
/div
/div/div!-- //header --!-- Container --div id=containerdiv class=left
/div
div class=content div class=news
/div/div
/div !-- //Container --!-- footer --div id=footer
/div!-- //footer --/div
==============================================css===========================================
/* Layout */#wrap{ width:1000px; }#header{ position:relative; width:1000px; height:200px; }#header .logo{ position:relative; width:200px; height:200px; float:left; }#header .gnb{ position:relative; width:800px; height:200px; float:left; }#header .gnb ul li{ width:200px; float:left;} #container{ position:relative; width:1000px; background-color:#eee; }
#container .left{ position:relative; width:200px; float:left; }#container .content{ position:relative; float:right; width:800px; } #container .news{ position:relative; width:800px; float:right; padding:10px 0px 0px 0px;}#container .news ul li{ width:335px;} #footer{ width:1000px; background-color:#eee; }
-
보담 2025-02-25
그럼 컨테이너 안에 컨텐츠들이 늘어나도 배경색이 안먹히나요???? 컨테이너는 높이를 안줘서 가변적으로 그안에 자식들크기에 쭉쭉늘어나게했는데 배경은 흰색으로 나오네요 ;;;
wrap 안에 모든것들은 다#eee 먹혀야하는데 말이죠 방법좀 알려주세요 ㅜㅜ -
나라우람 2025-02-25
wrap 안에 #eee를 넣엇는데 컨테이너가 높이값이 없어서 컨테이너 안에 내용들로 크기가 가변적으로 높이가 조절되게 코딩햇는데요 색이 안들어오네요.
-
수예 2025-02-25
그냥 wrap에다가 #eee 백그라운드 넣으시면 되죠~ 나머지 애들은 백그라운드 주지 말구요,
header, footer 얘들이 배경 흰색이라야 한다.. 그러면 요놈들한테 #fff 백그라운드 주심 되구요~