{"id":10678,"date":"2017-10-23T12:39:18","date_gmt":"2017-10-23T16:39:18","guid":{"rendered":"https:\/\/www.boldgrid.com\/support\/?p=10678"},"modified":"2020-03-12T14:39:24","modified_gmt":"2020-03-12T18:39:24","slug":"what-is-a-css-media-query","status":"publish","type":"post","link":"https:\/\/www.boldgrid.com\/support\/wordpress-tutorials\/what-is-a-css-media-query\/","title":{"rendered":"What is a CSS media query?"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<?xml encoding=\"utf-8\" ?><html><body><h2 id=\"what-are-media-queries\">What are media queries?<\/h2>\n<p>A <strong>media query<\/strong> is a <em>CSS technique<\/em> that was introduced in <em>CSS3<\/em>, which uses the <a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_mediaquery.asp\" rel=\"noopener noreferrer\" target=\"_blank\"><b>@media<\/b> rule<\/a> to allow for <em>CSS<\/em> properties within the query to be active if certain conditions are true. The conditions can be a number of things, such as screen resolution, color depth, aspect ratio and much more. <b>BoldGrid<\/b> uses the screen size to dictate these breakpoints in pixel size. <\/p>\n<p>A great example of this is to imagine that you like how your site looks on your phone, and tablet as well, but when you view it on the desktop the menu needs to be moved up to match the sites title. If you just use CSS rules to move it, then it will move it on all 3 device types or screen sizes. That is not what you desire, since your mobile and tablet design is just how you want it. This can be accomplished with a <strong>media query<\/strong> that specifies the rule should only apply if the screen is at least 992 pixels wide.  The following guide will explain how <b>media queries<\/b> can be used to change the design rules for one or more elements within a screen size range, while leaving the other screen sizes ranges design the same.<\/p>\n<h2 id=\"what-sizes-are-available\">What sizes are available?<\/h2>\n<p>Within the BoldGrid Theme Framework, you have 3 distinct sizes that can be used for CSS <b>media queries<\/b>. We label them as <em>Mobile<\/em> (up to 768 px wide), <em>Tablet<\/em> (from 768 to 992 px wide) and <em>Desktop<\/em> (everything over 992 px wide). <\/p>\n<div class=\"table-responsive\">\n<table class=\"table table-bordered\">\n<thead>\n<tr>\n<th><\/th>\n<th> Extra small devices <small>Phones (&lt;768px)<\/small> <\/th>\n<th> Small devices <small>Tablets (&ge;768px)<\/small> <\/th>\n<th> Medium devices <small>Desktops (&ge;992px)<\/small> <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th class=\"text-nowrap\" scope=\"row\">Grid behavior<\/th>\n<td>Horizontal at all times<\/td>\n<td colspan=\"2\">Collapsed to start, horizontal above breakpoints<\/td>\n<\/tr>\n<tr>\n<th class=\"text-nowrap\" scope=\"row\">Container width<\/th>\n<td>None (auto)<\/td>\n<td>750px<\/td>\n<td>970px<\/td>\n<\/tr>\n<tr>\n<th class=\"text-nowrap\" scope=\"row\">Class prefix<\/th>\n<td><code>.col-xs-<\/code><\/td>\n<td><code>.col-sm-<\/code><\/td>\n<td><code>.col-md-<\/code><\/td>\n<\/tr>\n<tr>\n<th class=\"text-nowrap\" scope=\"row\"># of columns<\/th>\n<td colspan=\"3\">12<\/td>\n<\/tr>\n<tr>\n<th class=\"text-nowrap\" scope=\"row\">Column width<\/th>\n<td class=\"text-muted\">Auto<\/td>\n<td>~62px<\/td>\n<td>~81px<\/td>\n<\/tr>\n<tr>\n<th class=\"text-nowrap\" scope=\"row\">Gutter width<\/th>\n<td colspan=\"3\">30px (15px on each side of a column)<\/td>\n<\/tr>\n<tr>\n<th class=\"text-nowrap\" scope=\"row\">Nestable<\/th>\n<td colspan=\"3\">Yes<\/td>\n<\/tr>\n<tr>\n<th class=\"text-nowrap\" scope=\"row\">Column ordering<\/th>\n<td colspan=\"3\">Yes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"why-use-media-queries\">Why use media queries?<\/h2>\n<p>Media Queries allow you to create separate, distinct rules that will be applied to your website based on the condition of the display. In regards to BoldGrid, media queries are responsive web design rules that dictate how your website will appear based on the screen size it is being viewed on. In the past, you would simply develop CSS rules, and it would apply to your site across all display sizes. Now, using media queries, you have a way to create different CSS rules that will apply to your websites layout based upon the screen size being used to render the site&rsquo;s design. <\/p>\n<h2 id=\"boldgrid-media-queries\">BoldGrid Media Queries<\/h2>\n<h3 id=\"mobile\">Mobile<\/h3>\n<pre>@media (max-width:767px) {\r\n\/* CSS RULES HERE *\/\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<h3 id=\"tablet\">Tablet<\/h3>\n<pre>@media (min-width:768px) and (max-width:991px) {\r\n\/* CSS RULES HERE *\/\r\n}<\/pre>\n<p><\/p>\n<p>&nbsp;<\/p>\n<h3 id=\"desktop\">Desktop<\/h3>\n<pre>@media (min-width: 992px) {\r\n\/* CSS RULES HERE *\/\r\n}<\/pre>\n<p><\/p>\n<p>&nbsp;<\/p>\n<p>Congratulations! You now know how to make changes to certain elements based on the screen size using media queries. We recommend that you use <a href=\"https:\/\/www.boldgrid.com\/support\/wordpress-tutorials\/how-to-use-google-chrome-developer-tools-to-customize-css-in-boldgrid\/\">Google Chrome Developer Tools <\/a>to help you Customize the CSS in BoldGrid, however most modern browsers have a comparable tool built in. The following tutorial will walk you through a practical example of applying a media query within your BoldGrid website. <\/p>\n<h2 id=\"applying-a-media-query\">Applying a media query<\/h2>\n<p>Once you have decided on the CSS changes you require, you can either apply the newly created media query within the Customizer, or create a child theme of your current install to create that change in your theme&rsquo;s style.css file. For this tutorial, we are going to be applying our media query in the Customizer. Since the header adjustments do not allow me to align the bottom of the menu in the way I am attempting for only the desktop version, we are going to create a rule to move the menu up a few pixels, but only when it is at least 992 pixels wide.<\/p>\n<p><a href=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu-1024x446.jpg\" alt=\"\" width=\"1024\" height=\"446\" class=\"aligncenter size-large wp-image-10686\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu-1024x446.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu-300x131.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu-768x334.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu-250x109.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu-550x239.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu-800x348.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu-414x180.jpg 414w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu-689x300.jpg 689w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu-1149x500.jpg 1149w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-01-header-menu.jpg 1480w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Using the <a href=\"https:\/\/www.boldgrid.com\/support\/wordpress-tutorials\/how-to-use-google-chrome-developer-tools-to-customize-css-in-boldgrid\/\">Chrome Developer Tool<\/a>, create the <em>CSS<\/em> changes you wish to make. We are going to be adjusting the menu, which has both an ID of <em>menu-primary<\/em>, and a class <em>.navbar-nav<\/em>, and use the <em>li<\/em> and <em>a<\/em> elements to target it specifically. <\/p>\n<p><a href=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools-1024x446.jpg\" alt=\"\" width=\"1024\" height=\"446\" class=\"aligncenter size-large wp-image-10687\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools-1024x446.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools-300x131.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools-768x334.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools-250x109.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools-550x239.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools-800x348.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools-414x180.jpg 414w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools-689x300.jpg 689w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools-1149x500.jpg 1149w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-02-chrome-dev-tools.jpg 1480w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The media query we are using is the following:<\/p>\n<pre>@media (min-width: 992px) {\r\n#menu-primary.nav.navbar-nav &gt; li &gt; a {\r\n    top: -60px;\r\n    }\r\n}<\/pre>\n<h2 id=\"adding-the-css-to-boldgrid\">Adding the CSS to BoldGrid<\/h2>\n<ol class=\"article-list\">\n<li><a href=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize-300x131.jpg\" alt=\"\" width=\"300\" height=\"131\" class=\"alignright size-medium wp-image-10688\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize-300x131.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize-768x334.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize-1024x446.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize-250x109.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize-550x239.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize-800x348.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize-414x180.jpg 414w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize-689x300.jpg 689w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize-1149x500.jpg 1149w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-03-customize.jpg 1480w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>Open the <b>Customizer<\/b>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li><a href=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced-300x131.jpg\" alt=\"\" width=\"300\" height=\"131\" class=\"alignright size-medium wp-image-10689\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced-300x131.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced-768x334.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced-1024x446.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced-250x109.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced-550x239.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced-800x348.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced-414x180.jpg 414w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced-689x300.jpg 689w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced-1149x500.jpg 1149w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-04-advanced.jpg 1480w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>Select <b>Advanced<\/b>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li><a href=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss-300x131.jpg\" alt=\"\" width=\"300\" height=\"131\" class=\"alignright size-medium wp-image-10690\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss-300x131.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss-768x334.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss-1024x446.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss-250x109.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss-550x239.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss-800x348.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss-414x180.jpg 414w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss-689x300.jpg 689w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss-1149x500.jpg 1149w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-05-customjscss.jpg 1480w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>Select <b>Custom JS &amp; CSS<\/b>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li><a href=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor-300x131.jpg\" alt=\"\" width=\"300\" height=\"131\" class=\"alignright size-medium wp-image-10691\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor-300x131.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor-768x334.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor-1024x446.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor-250x109.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor-550x239.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor-800x348.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor-414x180.jpg 414w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor-689x300.jpg 689w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor-1149x500.jpg 1149w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-06-open-editor.jpg 1480w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>Under Custom Theme CSS, Select <b>Open Editor<\/b>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li><a href=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css-300x131.jpg\" alt=\"\" width=\"300\" height=\"131\" class=\"alignright size-medium wp-image-10692\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css-300x131.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css-768x334.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css-1024x446.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css-250x109.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css-550x239.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css-800x348.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css-414x180.jpg 414w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css-689x300.jpg 689w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css-1149x500.jpg 1149w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-07-paste-css.jpg 1480w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><b>Paste<\/b> your media query in the editor. You will see your change apply instantly.\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li><a href=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor-300x131.jpg\" alt=\"\" width=\"300\" height=\"131\" class=\"alignright size-medium wp-image-10693\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor-300x131.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor-768x334.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor-1024x446.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor-250x109.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor-550x239.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor-800x348.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor-414x180.jpg 414w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor-689x300.jpg 689w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor-1149x500.jpg 1149w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-08-close-editor.jpg 1480w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><b>Close<\/b> the Editor by selecting the <b>X<\/b> in the top right hand corner\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li><a href=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish-300x131.jpg\" alt=\"\" width=\"300\" height=\"131\" class=\"alignright size-medium wp-image-10694\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish-300x131.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish-768x334.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish-1024x446.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish-250x109.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish-550x239.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish-800x348.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish-414x180.jpg 414w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish-689x300.jpg 689w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish-1149x500.jpg 1149w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2017\/10\/10678-09-save-publish.jpg 1480w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>Select <b>Save and Publish<\/b>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<div style=\"clear: both;\"><\/div>\n\n<\/ol>\n<p>Congratulations! You now know how to apply <b>media queries<\/b> to elements of your <b>BoldGrid<\/b> Website. <\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>What are media queries? A media query is a CSS technique that was introduced in CSS3, which uses the @media rule to allow for CSS properties within the query to be active if certain conditions are true. The conditions can be a number of things, such as screen resolution, color depth, aspect ratio and much [&hellip;]<\/p>\n","protected":false},"author":529,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"bgseo_title":"What is a CSS media query?","bgseo_description":"The following guide will explain how a media query can be used to change the CSS for one or more elements within a screen size range.","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[151],"tags":[],"class_list":["post-10678","post","type-post","status-publish","format-standard","hentry","category-wordpress-tutorials"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/10678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/users\/529"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/comments?post=10678"}],"version-history":[{"count":21,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/10678\/revisions"}],"predecessor-version":[{"id":17917,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/10678\/revisions\/17917"}],"wp:attachment":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/media?parent=10678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/categories?post=10678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/tags?post=10678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}