테스트 사이트 - 개발 중인 베타 버전입니다

왜 중앙정렬이 안되는지...ㅜㅜ 채택완료

1004 11년 전 조회 5,780

일반 페이지에서는 아래처럼 정렬이 잘 되는데요...


http://site2.dothome.co.kr/page/sub.html">http://site2.dothome.co.kr/page/sub.html


게시판을 달면 가운데 컨텐츠 부분만 가운데 정렬이 안되는건 왜 그런걸까요?

아무리 찾아보고 다르게 해봐도 안되는데 정말 환장하겠네요..ㅜㅜ


http://site2.dothome.co.kr/bbs/board.php?bo_table=board">http://site2.dothome.co.kr/bbs/board.php?bo_table=board



동일한 css파일을 사용하는데 왜 그누보드를 달면 안되는건지...

아시는 분 있음 좀 도와주셔요...ㅜㅜ

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
일단 본문 영역 전체체를 감싸는 container이 728xp로 설정되어있네요. 이것부터 삭제 해 주시고
그리고 float:left 빼주시구요.

현재 css
</div>
<div><div class="header monospace" style="box-sizing: border-box; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px; white-space: nowrap; color: #222222; line-height: normal">
<div class="title styles-selector" style="box-sizing: border-box; cursor: text; word-wrap: break-word; white-space: normal">
<div style="box-sizing: border-box"><span class="selector" style="box-sizing: border-box; color: #888888"><span class="simple-selector selector-matches" style="box-sizing: border-box; color: #222222">#container</span></span><span style="box-sizing: border-box"> {</span></div></div></div>
<ol class="properties monospace" style="box-sizing: border-box; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px; margin: 0px; padding: 2px 4px 0px 0px; list-style: none; clear: both; color: #222222; line-height: normal; white-space: nowrap">
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="z-index:4;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">z-index</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">4</span>;</li>
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="position:relative;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">position</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">relative</span>;</li>
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="float:left;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">float</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">left</span>;</li>
<li title="" class="parent" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="padding:15px 16px 15px 15px;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">padding</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block; background-image: url(chrome-devtools; background-size: 320px 144px; background-position: -4px -96px"></span><span class="value" style="box-sizing: border-box">15px 16px 15px 15px</span>;</li>
<li title="" class="parent" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="width:728px;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">width</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block; background-image: url(chrome-devtools; background-size: 320px 144px; background-position: -4px -96px"></span><span class="value" style="box-sizing: border-box">728px</span>;</li>
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="min-height:500px;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">min-height</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">500px</span>;</li>
<li title="" class="parent" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="height:auto !important;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">height</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block; background-image: url(chrome-devtools; background-size: 320px 144px; background-position: -4px -96px"></span><span class="value" style="box-sizing: border-box">auto !important</span>;</li>
<li title="" class="parent overloaded inactive" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; text-decoration: line-through; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="height:500px;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">height</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block; background-image: url(chrome-devtools; background-size: 320px 144px; background-position: -4px -96px"></span><span class="value" style="box-sizing: border-box">500px</span>;</li>
<li title="" class="parent" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="border-right:1px solid #dde4e9;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">border-right</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block; background-image: url(chrome-devtools; background-size: 320px 144px; background-position: -4px -96px"></span><span class="value" style="box-sizing: border-box">1px solid <nobr style="box-sizing: border-box"><span title="Click to open a colorpicker.
Shift-click to change color format." class="swatch" style="box-sizing: border-box; margin-left: 1px; margin-right: 2px; width: 10px; height: 10px; position: relative; top: 1px; display: inline-block; -webkit-user-select: none; background-image: url(chrome-devtools"><span class="swatch-inner" style="box-sizing: border-box; width: 10px; height: 10px; display: inline-block; border: 1px solid rgba(128, 128, 128, 0.6); background-color: #dde4e9"></span></span><span style="box-sizing: border-box">#dde4e9</span></nobr></span>;</li>
<li title="" class="parent" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="background:#fff;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">background</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block; background-image: url(chrome-devtools; background-size: 320px 144px; background-position: -4px -96px"></span><span class="value" style="box-sizing: border-box"><nobr style="box-sizing: border-box"><span title="Click to open a colorpicker.
Shift-click to change color format." class="swatch" style="box-sizing: border-box; margin-left: 1px; margin-right: 2px; width: 10px; height: 10px; position: relative; top: 1px; display: inline-block; -webkit-user-select: none; background-image: url(chrome-devtools"><span class="swatch-inner" style="box-sizing: border-box; width: 10px; height: 10px; display: inline-block; border: 1px solid rgba(128, 128, 128, 0.6)"></span></span><span style="box-sizing: border-box">#fff</span></nobr></span>;</li>
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="font-size:1em;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">font-size</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">1em</span>;</li>
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="zoom:1" style="box-sizing: border-box; color: #c80000; margin-left: -38px">zoom</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">1</span>;</li></ol>
<div class="styles-panel-hovered" style="box-sizing: border-box; color: #222222; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px; line-height: normal; white-space: nowrap">}</div></div>
<div>

중앙정렬된 css
</div>
<div><div class="header monospace" style="box-sizing: border-box; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px; white-space: nowrap; color: #222222; line-height: normal">
<div class="title styles-selector" style="box-sizing: border-box; cursor: text; word-wrap: break-word; white-space: normal">
<div style="box-sizing: border-box">
<div class="header monospace" style="box-sizing: border-box; white-space: nowrap">
<div class="title styles-selector" style="box-sizing: border-box; cursor: text; word-wrap: break-word; white-space: normal">
<div style="box-sizing: border-box"><span class="selector" style="box-sizing: border-box; color: #888888"><span class="simple-selector selector-matches" style="box-sizing: border-box; color: #222222">#container</span></span><span style="box-sizing: border-box"> {</span></div></div></div>
<ol class="properties monospace" style="box-sizing: border-box; margin: 0px; padding: 2px 4px 0px 0px; list-style: none; clear: both; white-space: nowrap">
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="z-index:4;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">z-index</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">4</span>;</li>
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="position:relative;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">position</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">relative</span>;</li>
<li title="" class="parent" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="padding:15px 16px 15px 15px;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">padding</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block"></span><span class="value" style="box-sizing: border-box">15px 16px 15px 15px</span>;</li>
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="min-height:500px;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">min-height</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">500px</span>;</li>
<li title="" class="parent" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="height:auto !important;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">height</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block"></span><span class="value" style="box-sizing: border-box">auto !important</span>;</li>
<li title="" class="parent overloaded inactive" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; text-decoration: line-through; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="height:500px;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">height</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block"></span><span class="value" style="box-sizing: border-box">500px</span>;</li>
<li title="" class="parent" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="border-right:1px solid #dde4e9;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">border-right</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block"></span><span class="value" style="box-sizing: border-box">1px solid <nobr style="box-sizing: border-box"><span title="Click to open a colorpicker.
Shift-click to change color format." class="swatch" style="box-sizing: border-box; margin-left: 1px; margin-right: 2px; width: 10px; height: 10px; position: relative; top: 1px; display: inline-block; -webkit-user-select: none"><span class="swatch-inner" style="box-sizing: border-box; width: 10px; height: 10px; display: inline-block; border: 1px solid rgba(128, 128, 128, 0.6); background-color: #dde4e9"></span></span><span style="box-sizing: border-box">#dde4e9</span></nobr></span>;</li>
<li title="" class="parent" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="background:#fff;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">background</span>: <span class="expand-element" style="box-sizing: border-box; -webkit-user-select: none; margin-right: 2px; margin-left: -6px; opacity: 0.55; width: 8px; height: 10px; display: inline-block"></span><span class="value" style="box-sizing: border-box"><nobr style="box-sizing: border-box"><span title="Click to open a colorpicker.
Shift-click to change color format." class="swatch" style="box-sizing: border-box; margin-left: 1px; margin-right: 2px; width: 10px; height: 10px; position: relative; top: 1px; display: inline-block; -webkit-user-select: none"><span class="swatch-inner" style="box-sizing: border-box; width: 10px; height: 10px; display: inline-block; border: 1px solid rgba(128, 128, 128, 0.6)"></span></span><span style="box-sizing: border-box">#fff</span></nobr></span>;</li>
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="font-size:1em;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">font-size</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">1em</span>;</li>
<li title="" style="box-sizing: border-box; padding-left: 38px; white-space: normal; text-overflow: ellipsis; overflow: hidden; cursor: auto; margin-left: 0px !important"><input class="enabled-button" type="checkbox" style="font-family: inherit; font-size: 10px; height: 12px; width: 18px; margin: 0px; flex-shrink: 0; visibility: hidden; float: left; vertical-align: top; position: relative; z-index: 1; left: -40px; top: 1px" /><span class="webkit-css-property" title="zoom:1;" style="box-sizing: border-box; color: #c80000; margin-left: -38px">zoom</span>: <span class="expand-element" style="box-sizing: border-box"></span><span class="value" style="box-sizing: border-box">1</span>;</li></ol>
<div style="box-sizing: border-box; white-space: nowrap">}</div>
<div style="box-sizing: border-box; white-space: nowrap">

그리고 잘되는 페이지와 되지않는 페이지 두개의 css는 동일하지 않습니다. 살펴보니 많이 다르네요.



로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

W
11년 전

제가 만든 css 파일 말고 그누보드에 있는 default.css 파일에 들어가있네요...

그럼, 매번 그걸 수정해줘야 하는건지 궁금합니다.


로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인