LAYOUT LAB / CANONICAL HTML + CSS

center

Center a block while respecting a maximum measure.

720px

원문 CSS의 공간 배치를 실행합니다. 색·테두리는 영역 구분용이며, 비어 있던 미디어와 설정 슬롯에는 예시 콘텐츠를 채웠습니다.

실행한 HTML·CSS 코드
<article class="center" aria-labelledby="center-heading">
    <h2 id="center-heading">Editorial policy</h2>
    <p>Long-form guidance stays readable while the page around it remains fluid.</p>
</article>

<style>
.center {
    margin-inline: auto;
    max-inline-size: 64rem;
    padding-inline: 1rem;
}

</style>
원문 가이드