왼쪽 배너를 div 로 했더니 창을 줄이면 배너가 가운데로 옵니다. 정보
왼쪽 배너를 div 로 했더니 창을 줄이면 배너가 가운데로 옵니다.본문
www.lizardking.kr 에서 창을 한번 줄여보세요 어떻게 해결하죠?
댓글 전체
position:absolute 속성은 상속받는 부모 포지션이 없을땐 화면에 따라(화면이 왼쪽 상단이 기준이 됩니다) 위치가 움직입니다.
position:absolute를 감싼 부모 레이어를 만들어 주시고 position:relative로 위치를 제어를 하신다면 ..근데 지금 홈페이지의 경우 레이아웃이 쉽지는 않을것 같네요.우측의 퀵스크롤 메뉴도 위치가 안맞네요
<html>
<head></head>
<body>
<div style="width:100%;height:100%;text-align:center">
<div style="position:relative;width:1024px;margin:0 auto;border:1px solid #f60">
<div style="position:absolute; left:0; top:0; width:100px; height:500px;background:#ccc">좌측배너</div>
<div style="width:800px;height:700px;margin:0 auto;background:#ddd;text-align:left";>중앙</div>
<div style="position:absolute; right:0; top:0; width:100px; height:500px;background:#999">우측퀵메뉴</div>
</div>
</div>
</body>
</html>
대충 이런 구조로 작업을 하시면 될듯
position:absolute를 감싼 부모 레이어를 만들어 주시고 position:relative로 위치를 제어를 하신다면 ..근데 지금 홈페이지의 경우 레이아웃이 쉽지는 않을것 같네요.우측의 퀵스크롤 메뉴도 위치가 안맞네요
<html>
<head></head>
<body>
<div style="width:100%;height:100%;text-align:center">
<div style="position:relative;width:1024px;margin:0 auto;border:1px solid #f60">
<div style="position:absolute; left:0; top:0; width:100px; height:500px;background:#ccc">좌측배너</div>
<div style="width:800px;height:700px;margin:0 auto;background:#ddd;text-align:left";>중앙</div>
<div style="position:absolute; right:0; top:0; width:100px; height:500px;background:#999">우측퀵메뉴</div>
</div>
</div>
</body>
</html>
대충 이런 구조로 작업을 하시면 될듯