{"id":277,"date":"2016-09-06T15:02:09","date_gmt":"2016-09-06T15:02:09","guid":{"rendered":"https:\/\/wiki.samuelchopard.ch\/?p=277"},"modified":"2019-03-18T14:29:26","modified_gmt":"2019-03-18T13:29:26","slug":"use-css3-media-queries-to-adapt-your-website-for-mobile","status":"publish","type":"post","link":"https:\/\/samuelchopard.ch\/wiki\/library\/use-css3-media-queries-to-adapt-your-website-for-mobile\/","title":{"rendered":"Use CSS3 media queries to adapt your website for mobile"},"content":{"rendered":"<p><!--more--><\/p>\n<pre class=\"EnlighterJSRAW\">@media only screen and (max-device-width: 1100px) {\n\n     #yourselector {\n          parameter: setting;\n     } \n\n}<\/pre>\n<p>If you want to display elements ONLY on mobile, add the same code replacing &#8220;<strong>max<\/strong>-device-width&#8221; by &#8220;<strong>min<\/strong>-device-width&#8221;.<\/p>\n<p>Source: <a target=\"_blank\" href=\"https:\/\/www.smashingmagazine.com\/2010\/07\/how-to-use-css3-media-queries-to-create-a-mobile-version-of-your-website\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.smashingmagazine.com\/2010\/07\/how-to-use-css3-media-queries-to-create-a-mobile-version-of-your-website\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"@media only screen and (max-device-width: 1100px) { #yourselector { parameter: setting; } } If you want to display elements ONLY [...]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[69,182,261,273,274],"class_list":["post-277","post","type-post","status-publish","format-standard","hentry","category-htmlcss","tag-css","tag-mobile","tag-select","tag-size","tag-small-screen"],"_links":{"self":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/277","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/comments?post=277"}],"version-history":[{"count":1,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/277\/revisions"}],"predecessor-version":[{"id":54912,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/277\/revisions\/54912"}],"wp:attachment":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/media?parent=277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/categories?post=277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/tags?post=277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}