Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.


CSS Layout Course

via Treehouse


In this course, we're going to learn techniques for better control over our CSS layouts. We’ll cover how the CSS Box Model impacts the presentation of each HTML element, learn to control the position of each element onscreen, and even begin to adjust our layouts for different screen sizes and environments.

What you'll learn

  • The CSS Box Model
  • CSS Display Property
  • CSS Positioning
  • CSS Media Queries


The CSS Box Model

Gaining more control over your CSS layouts starts with one very important concept: understanding the CSS Box Model. The Box Model is what describes the amount of space each element takes up on the page.

Chevron 6 steps
  • Introducing the Box Model


  • Padding


  • Border


  • Margin


  • Quiz: The Box Model

    6 questions

  • Padding, Borders, and Margins

    5 objectives

Box Model Concepts

In our last stage, we learned the parts of the CSS Box model. We also learned that padding and border impact the size of a CSS box, while margin doesn’t.

In this stage, we’re going to become familiar with a few advanced concepts, including box-sizing, max-width, and viewport units.

Chevron 5 steps
  • Box-sizing


  • max-width


  • Viewport Units


  • Viewport Units

    2 objectives

  • Quiz: Box Model Concepts

    5 questions

CSS Layout Techniques

In this stage, we'll work with CSS Layout Techniques, including working with the display property, CSS positioning, and float and clear.

Chevron 8 steps
  • Display


  • Display

    3 objectives

  • Relative and Absolute Positioning


  • Fixed and Sticky Positioning


  • Positioning Elements

    4 objectives

  • Float


  • Float

    2 objectives

  • Quiz: CSS Layout Techniques

    6 questions

CSS Media Queries

As users, we look at websites and applications every day on a variety of screens, from laptops to tablets to phones. How do developers keep their web content legible in such a broad variety of viewing environments?

In this stage you’ll learn one very important step in optimizing your content for different platforms: writing CSS media queries.

Chevron 7 steps
  • What are Media Queries?


  • Targeting Media Features


  • Media Queries

    2 objectives

  • The meta Viewport Declaration


  • Complex Media Queries


  • Complex Media Queries

    1 objective

  • Quiz: Media Queries

    5 questions

Taught by

Anwar Montasir


Start your review of CSS Layout Course

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.