{"id":2370,"date":"2013-06-10T13:58:30","date_gmt":"2013-06-10T12:58:30","guid":{"rendered":"http:\/\/positech.co.uk\/cliffsblog\/?p=2370"},"modified":"2013-06-10T13:58:30","modified_gmt":"2013-06-10T12:58:30","slug":"little-bit-of-css-web-design-stuff","status":"publish","type":"post","link":"https:\/\/www.positech.co.uk\/cliffsblog\/2013\/06\/10\/little-bit-of-css-web-design-stuff\/","title":{"rendered":"Little bit of CSS \/ web design stuff&#8230;"},"content":{"rendered":"<p>I sell games to a lot of people with BIG monitors and desktop PCs. But then, a lot of people also play, and surf on smaller-screen laptops. Basically it is about time I stopped serving the exact same web page to everyone. So as of today, positech.co.uk is a little cleverer than before!<\/p>\n<p>check it out, and try resizing the window if you have a big screen:<\/p>\n<p><a href=\"http:\/\/www.positech.co.uk\/index.html\">http:\/\/www.positech.co.uk\/index.html<\/a><\/p>\n<p>The bulk of the site is the same, but depending on screen width, you get 3,4 or 5 little images linking to other games under the big slider thing. I think this makes good use of 1920 res monitors without sticking horizontal scrollbars (ugh) on smaller browser windows. It&#8217;s easy to do as well&#8230;<\/p>\n<p>You just need to use some CSS, and a few &lt;div&gt; sections here and there. if you name a &lt;div&gt;, you can adjust it&#8217;s width based on the browser window inside the css like this:<\/p>\n<pre>@media screen and (min-width: 1400px) and (max-width: 1648px)\r\n{\r\n\u00a0 .gamesection {width: 1316px;}\r\n}<\/pre>\n<p>That makes the gamesection div 1316px wide if the screen size is between those 2 values.<\/p>\n<p>I can then hide\/show the &#8216;optional&#8217; boxes with the extra images the same way, using named divs in the html:<\/p>\n<pre>@media screen and (min-width: 1400px) and (max-width: 1648px)\r\n{\r\n\u00a0 #optionalbox { display: block; }\r\n\u00a0 #optionalbox2 { display: none; } \/*hide 5th game box if screen is too short*\/\r\n}<\/pre>\n<p>I thought it was cool anyway :D<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I sell games to a lot of people with BIG monitors and desktop PCs. But then, a lot of people also play, and surf on smaller-screen laptops. Basically it is about time I stopped serving the exact same web page to everyone. So as of today, positech.co.uk is a little cleverer than before! check it<\/p>\n<p class=\"text-right\"><span class=\"screen-reader-text\">Continue Reading&#8230; Little bit of CSS \/ web design stuff&#8230;<\/span><a class=\"btn btn-secondary continue-reading\" href=\"https:\/\/www.positech.co.uk\/cliffsblog\/2013\/06\/10\/little-bit-of-css-web-design-stuff\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2370","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/2370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/comments?post=2370"}],"version-history":[{"count":1,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/2370\/revisions"}],"predecessor-version":[{"id":2371,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/2370\/revisions\/2371"}],"wp:attachment":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/media?parent=2370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/categories?post=2370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/tags?post=2370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}