Join James Williamson for an in-depth discussion in this video Controlling viewports, part of Learning Responsive Design.
Now that we've defined exactly what the mobile viewport is, we need to discuss how to control them.…Currently, there are two mechanisms for overriding the user agent's default viewport.…You can either use the viewport meta tag or the @viewport CSS rule.…Since they both use similar syntax, I'm going to show you code examples for each, and then…describe their effects on the viewport.…The meta viewport tag appears in the head of your HTML, and has two basic parts: name,…which is viewport, and content, which will contain the properties and values you wish…to set for the viewport itself.…
The @viewport rule can appear anywhere in your CSS that you want, but since it can affect…media queries, it's recommended that you place it prior to any media queries in your styles.…Most designers place it near the top of their styles as one of, if not the very first, rule.…The syntax is similar to the meta viewport tag.…You simply declare an @viewport rule and then populate it with the properties that you wish to control.…
- What is responsive design?
- Controlling viewports
- Designing for multiple screen densities
- Working with media queries
- Using fluid grids
- Building responsive forms
- Optimizing site performance
- Building responsive mockups
- Developing a content strategy
- Designing for mobile capabilities
- Creating flexible HTML
- Testing responsive designs
Skill Level Beginner
1. Introducing Responsive Design
What makes sites responsive?2m 37s
2. Common Concepts
3. Responsive Design Strategies
Additional resources2m 12s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.