跳到主要内容

Width and centering

English

Width

  • By default, a block box is as wide as the box it sits in — the whole page, if it sits straight in <body>.
  • width: 300px; makes it a fixed width instead.
  • max-width: 600px; is gentler — at most this wide, but shrink on small screens.

讲义

登录或创建账户

IGCSE, A-Level & AP