position: relative; 질문좀 ㅜㅜ
-
게시물 수정 , 삭제는 로그인 필요
안녕하세요 웹디자인을 하고 있는데..
코딩하다가 오른쪽에 배너를 넣으려고 하는데..
position: relative; 하고 나니
배너 크기만큼 중앙 컨텐츠가 밀려버리네요..
안밀리게 하는방법이 없을까요..?
js?인가 그거 써야 하는지..요..
좀 알려주세요..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Layouts - 1 Column Layout - 31</title>
<style type="text/css">
#banner{
position: relative;
width: 200px;
height:400px;
top:10px;
left: 800px;
background-color: #FF9900;
}
* {
padding: 0;
margin: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
color: #666666;
font-size: 12px;
}
#wrapper {
width: 770px;
margin: 0 auto;
}
#header {
border: 1px solid #ccc;
margin: 5px;
height: 70px;
padding: 10px;
background-color: #C9C9BE;
}
#centercolumn {
border: 1px solid #ccc;
margin: 0 5px 5px 5px;
display: inline; /* IE Hack */
padding: 4px;
width: 97.4%;
float: left;
min-height: 300px;
}
* html #centercolumn {height:300px} /* IE Min-Height Hack */
#footer {
background-color: #A3A38F;
margin: 0 5px 5px 5px;
display: inline; /* IE Hack */
padding: 4px;
float: left;
width: 97.8%;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="banner">
<div id="a">배너 나오는곳</div>
</div>
<div id="centercolumn">
<p>이공간을 위로 올리는 방법은 없나요..?</p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p> </p>
</div>
<div id="footer">Footer</div>
</div>
</body>
</html>
안녕하세요 웹디자인을 하고 있는데..
코딩하다가 오른쪽에 배너를 넣으려고 하는데..
position: relative; 하고 나니
배너 크기만큼 중앙 컨텐츠가 밀려버리네요..
안밀리게 하는방법이 없을까요..?
js?인가 그거 써야 하는지..요..
좀 알려주세요..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Layouts - 1 Column Layout - 31</title>
<style type="text/css">
#banner{
position: relative;
width: 200px;
height:400px;
top:10px;
left: 800px;
background-color: #FF9900;
}
* {
padding: 0;
margin: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
color: #666666;
font-size: 12px;
}
#wrapper {
width: 770px;
margin: 0 auto;
}
#header {
border: 1px solid #ccc;
margin: 5px;
height: 70px;
padding: 10px;
background-color: #C9C9BE;
}
#centercolumn {
border: 1px solid #ccc;
margin: 0 5px 5px 5px;
display: inline; /* IE Hack */
padding: 4px;
width: 97.4%;
float: left;
min-height: 300px;
}
* html #centercolumn {height:300px} /* IE Min-Height Hack */
#footer {
background-color: #A3A38F;
margin: 0 5px 5px 5px;
display: inline; /* IE Hack */
padding: 4px;
float: left;
width: 97.8%;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="banner">
<div id="a">배너 나오는곳</div>
</div>
<div id="centercolumn">
<p>이공간을 위로 올리는 방법은 없나요..?</p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p> </p>
</div>
<div id="footer">Footer</div>
</div>
</body>
</html>
#position relative absolute #position relative 가운데 정렬 #position relative z-index #position relative 뜻 #position relative absolute 차이 #position relative fixed #position relative 겹침 #position relative center #position relative 안될때 #position relative height