Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Mobile-First CSS Layout!
You have completed Mobile-First CSS Layout!
Preview
A common layout structure in web design involves a centered content area with a header and footer that take up the full width of the page.
Video review
- Depending on your design, you may want the header and footer in your layout to stretch from edge to edge of the browser so the left and right sides won't appear cut off.
- This approach makes the layout feel open and less constrained.
- One approach is to create a wrapper the main content and an inner wrapper for the content inside the header and footer.
- You can leave 'outer' elements like the header and footer at their default 100% width.
- It's common to have more than one wrapper on a page and even to have containers inside of containers.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
content area with a header and footer
that take up the full width of the page.
0:00
Depending on your layout,
you may want the header and
0:01
footer in your layout to stretch from
edge to edge of the browser window.
0:04
That way, if the header and footer have
a background color or image, the left and
0:09
right sides won't appear cut off.
0:14
For example, this travel website
uses a full width header and
0:17
footer while keeping all
the content centered on the page.
0:21
This makes the layout feel more open,
and less constrained.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up