Using media queries


show more Using media queries provides you with in-depth training on Web. Taught by James Williamson as part of the CSS: Page Layouts show less
please wait ...

Using media queries

Media queries allow you to determine which styles are applied to pages based on specific media properties, such as screen width, color, or resolution. Now, if you're familiar with using the media attribute to apply styles for screen devices, print, projection, that sort of thing, then media queries are going to feel very natural to you, because they're just an extension of existing media capabilities. So to kind of show you what media queries are capable of, I have the media-queries.htm file open from the 07_02 folder. And I want to preview this page in the browser real quick, so we can do a quick rundown of the syntax before we actually start using them.

So the basic syntax you can see in the first block of code here, basically after whatever media declaration you are doing, you can put before it, you can put two keywords, optional keywords: not or only. Not will negate everything that comes after it, so it's sort of testing to see what isn't true, and then only is design...

Using media queries
Video duration: 7m 16s 8h 57m Beginner

Viewers:

Using media queries provides you with in-depth training on Web. Taught by James Williamson as part of the CSS: Page Layouts

Subject:
Web
Software:
CSS
Author:
please wait ...