편집 : .firstlayer의 위치를 절대로 변경하여이 문제를 해결했습니다. 이렇게하면 left/right 여백을 auto로 설정하면 컨테이너를 중앙에 맞출 수 없으므로 left : 0; 오른쪽 : 0; 폭을 정의하고 중요한 것으로 표시하면 컨테이너를 가운데에 배치합니다. 도와 주셔서 감사합니다!컨테이너 크기 (HTML)?
명확히하기 위해 페이지의 맨 아래로 확장하려고합니다. 지금까지의 모든 시도는 성공하지 못했습니다. 또한 모든 높이 특성은 브라우저 호환성을 위해 .firstlayer에 있습니다.
주석이 달린 스크린 샷은 here :(지금 레이아웃을 작성 중이므로 어리석은 것으로 보입니다).
나는 꽤 바보 같은 질문이 있습니다. 웹 페이지에서 작업하고 있는데 <span>
영역을 페이지 맨 아래까지 확장하려고합니다. 저는 온라인으로 답변을 검색했고 Iset의 본문 및 html 높이를 100 %로, 컨테이너 높이를 auto/min-height로 100 %로 설정했습니다. 그러나 여전히 페이지 나누기에만 도달했습니다.
누구든지이 문제를 해결하는 방법에 대한 제안 사항이 있습니까?
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video{
border:0 none;
font:inherit;
margin:0;
padding:0;
}
html, body { width:100%; height:100%; }
body { background: #ff8 url("blue.jpg") repeat fixed; font-family: Helvetica, San-Serif; }
/*----- GRID -----*/
.container {
background: none;
overflow: none;
display: block;
z-index: 1;
}
.firstlayer {
background-color: #fff !important;
height: auto !important;
min-height: 100%;
height: 100%;
width: 960px;
margin:0 auto;
border-left: solid 1px #000; border-right: solid 1px #000;
}
.padded {margin-left:20px; margin-right:20px;}
span { height:auto; }
.onecol { width:8.33%; float:left; }
.twocols { width:16.66%; float:left; }
.threecols { width:25%; float:left; }
.fourcols { width:33.33%; float:left; }
.fivecols { width:41.66%; float:left; }
.sixcols { width:50%; float:left; }
.sevencols { width:58.33%; float:left; }
.eightcols { width:66.66%; float:left; }
.ninecols { width:75%; float:left; }
.tencols { width:83.33%; float:left; }
.elevencols { width:91.66%; float:left; }
.allcols { width:100%; float:left; }
footer {
font-size: 0.75em;
color: #fff;
background: 100px #000;
padding:10px 20px 10px 20px;
bottom: 0px;
height:7em;
}
그리고 내 HTML 코드는 여기에 있습니다 : :
내 CSS는 여기 여기
<!--Begin the content area-->
<span class="container firstlayer">
<span class="container padded">
<!--TITLE AND SUBTITLE-->
<span class="container allcols">
<h1>Stand-in Title</h1>
<h1 class="subtitle">Stand-in Subtitle</h1>
</span>
<!--MEDIA PLACEHOLDER-->
<span style="height:400px; background-color:#000;" class="container allcols">
</span>
<!--ROW ZERO: 2 COLS-->
<span class="allcols" style="padding-top:1em;">
<span class="container sixcols">
<h2>Subtitle</h2>
<p> Lorem ipsum </p>
</span>
<span class="container sixcols">
<h2>Subtitle</h2>
<p> Lorem ipsum </p>
</span>
</span>
</span>
</span>
'span {height : auto; }'line – Hope4You
정확하게 미디어 컨테이너가 창 크기에 따라 높이를 확장하려고하는 것을 올바르게 이해한다면? – Keith
당신은'span' 대신에'div' 's를 사용해야합니다. 'div'는 "block"수준의 요소이기 때문에 적절한 래퍼 컨테이너입니다.'span'은 "인라인"요소이기 때문에 적절한 래퍼 컨테이너가 아닙니다. [the W3 spec] (http://www.w3.org/TR/html401/struct/global.html#h-7.5.4)를 참조하십시오. – Sparky