Center A Design In The Browser Window

Skills Covered

  • Margin: Auto
  • Text-Align: Center

Estimated Work Time

  • 15 Minutes

With this lesson we'll center all of the content inside a browser window. Watch the video below to walk through these steps:

  1. Start with an HTML template page and Save As center_layout.
  2. Add a classic wrapper div and insert some placeholder text.
  3. Link to a style sheet called center.css
  4. Create the center.css document and create a wrapper id declaration.
  5. Add background-color and width declarations.

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

Your web page should function like this now.