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.
Including height in media queries - CSS Tutorial
From the course: Advanced CSS Media Queries
Including height in media queries
- [Instructor] Height is another factor that can drive media queries. As you might expect, there's a min height and a max height just as there were min width and max width media queries. Even if most of your responsive design is driven by width-based media queries, there are still occasions where a height query might help. For example, what about a screen where an image carousel is taller than some of the shorter screens you might be working with? You could use a height-based media query to shorten that carousel or even hide it altogether at those smaller dimensions. Here in my super simple example, I have a layout where I've got these series of icons here. These are font awesome icons. And if you look at the HTML, there are set up all pretty much in the same way. There's a class of fas and then there's a class that's specific to each one of those icons individually. The first one is fa-seedling and then if you scroll on down…
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
-
-
-