From the course: Advanced CSS Media Queries
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Changing media in media queries - CSS Tutorial
From the course: Advanced CSS Media Queries
Changing media in media queries
- [Instructor] Next up, let's take a look at CodePen and start writing some media queries. And I'm going to start with changing the media inside a media query. In this case, we're going to work with some print styles. Before I get started on that, though, let's just take a quick look at the code we have, here. This is going to be the same HTML and CSS that we're going to use in examples throughout this course, so it's sort of nice to take a look at what we've got just for the moment. So we're going to start over here, with the HTML and we're going to start with a div with a class of row. This is going to start here, on line two. It's going to end down here on line 27. So everything is encompassed by that except for the title of this page, Two Trees Olive Oil. Inside of this, we have four articles. Basically, each one is exactly the same, it's just got different content. We have an H2, indicating the type of olive oil…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Understanding media in media queries3m 4s
-
(Locked)
Changing media in media queries5m 48s
-
(Locked)
Including width in media queries6m 16s
-
(Locked)
Including height in media queries3m 10s
-
(Locked)
Including aspect ratio in media queries3m 55s
-
(Locked)
Testing for monochrome devices2m 4s
-
(Locked)
Testing for screen orientation3m 23s
-
(Locked)
Testing for screen resolution4m 18s
-
(Locked)
Testing for hover and pointer5m 4s
-
-
-