사이트 가운데 정렬 질문 정보
사이트 가운데 정렬 질문본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
항상 사이트가 왼쪽으로 딱 붙어있어서 사이트 확대 축소할때 이곳 그누보드 사이트 처럼 가운데 정렬하고 싶은데요
layout.css에서 고쳐주는것 같은데 어딜 고쳐줘야 하는건가요?
#wrap 에서 float를 right로 하면 오른쪽으로 딱 붙습니다, 그래서 center로 해봤는데 역시나 왼쪽으로 딱 붙네요
알려주세요~
/* Layout Generator - NHN - http://html.nhncorp.com/uio_factory/uio_generator/layout/1 */
#wrap {
width:960px; /* 전체 넓이 = snb + snb margin-right + content + aside + aside margin-left */
margin: 0 0 0 5px; /* 왼쪽을 5px 만큼 띄워 줍니다 */
float:center;
}
#header {
width:100%;
}
#container {
margin: 5px 0 0 0; /* 위쪽을 5px 만큼 띄워 줍니다 */
width:100%;
}
#container:after {
display:block;
clear:both;
content:'';
}
#footer {
width:100%;
}
#content {
float:left;
width:770px; /* 내용부의 넓이 */
}
.snb {
float:left;
width:165px; /* 좌측 메뉴부의 넓이 */
margin-right:5px; /* 띄워주기 */
}
.aside {
float:right;
width:250px; /* 우측 사이드의 넓이 */
margin-left:0px; /* 띄워주기 */
}
.gnb {
}
.sta {
position:relative;
width:100%;
margin:0 auto;
padding-top:5px;
}
.sta:after {
display:block;
clear:both;
content:''
}
오류 주소 :
항상 사이트가 왼쪽으로 딱 붙어있어서 사이트 확대 축소할때 이곳 그누보드 사이트 처럼 가운데 정렬하고 싶은데요
layout.css에서 고쳐주는것 같은데 어딜 고쳐줘야 하는건가요?
#wrap 에서 float를 right로 하면 오른쪽으로 딱 붙습니다, 그래서 center로 해봤는데 역시나 왼쪽으로 딱 붙네요
알려주세요~
/* Layout Generator - NHN - http://html.nhncorp.com/uio_factory/uio_generator/layout/1 */
#wrap {
width:960px; /* 전체 넓이 = snb + snb margin-right + content + aside + aside margin-left */
margin: 0 0 0 5px; /* 왼쪽을 5px 만큼 띄워 줍니다 */
float:center;
}
#header {
width:100%;
}
#container {
margin: 5px 0 0 0; /* 위쪽을 5px 만큼 띄워 줍니다 */
width:100%;
}
#container:after {
display:block;
clear:both;
content:'';
}
#footer {
width:100%;
}
#content {
float:left;
width:770px; /* 내용부의 넓이 */
}
.snb {
float:left;
width:165px; /* 좌측 메뉴부의 넓이 */
margin-right:5px; /* 띄워주기 */
}
.aside {
float:right;
width:250px; /* 우측 사이드의 넓이 */
margin-left:0px; /* 띄워주기 */
}
.gnb {
}
.sta {
position:relative;
width:100%;
margin:0 auto;
padding-top:5px;
}
.sta:after {
display:block;
clear:both;
content:''
}
댓글 전체
margin: 0 0 0 5px; 요거를 margin:0 auto; 로 바꾸세영
감사합니다! 잘되네요~