{"id":10166,"date":"2011-09-16T07:03:22","date_gmt":"2011-09-16T11:03:22","guid":{"rendered":"http:\/\/info.template-help.com\/?p=10166"},"modified":"2015-09-18T07:09:50","modified_gmt":"2015-09-18T11:09:50","slug":"css-grid-960-system","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/css-grid-960-system.html","title":{"rendered":"CSS. Grid 960 system"},"content":{"rendered":"<p>Browsing  through the template&rsquo;s source code and styles you may have seen the classes  like : &ldquo;<strong>grid_6<\/strong>&rdquo;, &ldquo;<strong>grid_8<\/strong>&rdquo;. These are the classes used by the <strong>grid 960 system<\/strong>. Let&rsquo;s see what this  system is and what it can offer. <\/p>\r\n\r\n<p>The 960  Grid System is an effort to streamline web development workflow by providing  commonly used dimensions, based on a width of 960 pixels. There are several variants  of the layout. The most often used are 12 columns, 16 columns and 24 columns  grids. <\/p>\r\n\r\n\r\n<a href=\"http:\/\/info.template-help.com\/wp-content\/uploads\/2011\/09\/grid-960-1.jpg\"><img loading=\"lazy\" src=\"http:\/\/info.template-help.com\/wp-content\/uploads\/2011\/09\/grid-960-1-216x300.jpg\" alt=\"\" title=\"grid-960-1\" width=\"216\" height=\"300\" class=\"alignleft size-medium wp-image-10168\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/09\/grid-960-1-216x300.jpg 216w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/09\/grid-960-1.jpg 576w\" sizes=\"(max-width: 216px) 100vw, 216px\" \/><\/a>\r\n  Below you  can see the example of 24 columns grid used for the template:<\/p>\r\n\r\n<a href=\"http:\/\/info.template-help.com\/wp-content\/uploads\/2011\/09\/grid-960-2.jpg\"><img loading=\"lazy\" src=\"http:\/\/info.template-help.com\/wp-content\/uploads\/2011\/09\/grid-960-2-248x300.jpg\" alt=\"\" title=\"grid-960-2\" width=\"248\" height=\"300\" class=\"alignleft size-medium wp-image-10169\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/09\/grid-960-2-248x300.jpg 248w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/09\/grid-960-2-847x1024.jpg 847w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/09\/grid-960-2.jpg 1200w\" sizes=\"(max-width: 248px) 100vw, 248px\" \/><\/a>\r\n\r\n<p>As you can  see the layout blocks fit the grid columns. Using the available classes you can  easily change the website layout according to your needs. <\/p>\r\n\r\n<h3>Usage<\/h3>\r\n\r\n<p>Each  template where the grid system has been used contains the grid.css file where  you can see the specific classes used. Let&rsquo;s see how the grid system can be  used. <\/p>\r\n\r\n<p>Open the  grid.css file, what can you see there:<\/p>\r\n<p>\u00a0At the beginning of the css file you can see:<\/p>\r\n<p> columns:24<br>\r\nColumn width:30<br>\r\nGutter width:10<\/p>\r\n\r\n<a href=\"http:\/\/info.template-help.com\/wp-content\/uploads\/2011\/09\/grid-960-3.jpg\"><img loading=\"lazy\" src=\"http:\/\/info.template-help.com\/wp-content\/uploads\/2011\/09\/grid-960-3-300x54.jpg\" alt=\"\" title=\"grid-960-3\" width=\"300\" height=\"54\" class=\"alignleft size-medium wp-image-10170\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/09\/grid-960-3-300x54.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/09\/grid-960-3.jpg 962w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\r\n<p>So the intial file info shows you the number of columns used, the columns width and gutter width. <\/p>\r\n<p>Then you can see the class <strong>.container_24{}<\/strong> &#8211; this class should be used for the container that will keep all you website content. <\/p>\r\n\r\n<p class=\"tip\">Note: the main class could be called <strong>container_12<\/strong> or <strong>container 16<\/strong> depending on the number of columns used. <\/p>\r\n\r\n<p>Then the classes <strong>.grid_1<\/strong>, <strong>.grid_2<\/strong> etc. &#8211; these classses could be used to set the width of the inner blocks. The blocks with grid classes should be put inside the block with class container_24. <\/p>\r\n\r\n<p>The classes defines the width of the blocks:<\/p>\r\n\r\n<pre class=\"brush:css\">\r\n.container_24 .grid_2 {<br>\r\nwidth:70px;<br>\r\n} \r\n<\/pre>\r\n\r\n<p>&nbsp;<\/p>\r\n<p>For example the code for the following layout is:<\/p>\r\n\r\n<a href=\"http:\/\/info.template-help.com\/wp-content\/uploads\/2011\/09\/grid-960-4.jpg\"><img loading=\"lazy\" src=\"http:\/\/info.template-help.com\/wp-content\/uploads\/2011\/09\/grid-960-4-300x86.jpg\" alt=\"\" title=\"grid-960-4\" width=\"300\" height=\"86\" class=\"alignleft size-medium wp-image-10167\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/09\/grid-960-4-300x86.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/09\/grid-960-4.jpg 952w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\r\n<pre class=\"brush:html\">&lt;div class=&quot;container_24&quot;&gt;<br>\r\n&lt;div class=&quot;grid_9&quot;&gt;Some content&lt;\/div&gt;<br>\r\n&lt;div class=&quot;grid_15&quot;&gt;Some content&lt;\/div&gt;<br>\r\n&lt;div class=&quot;grid_12&quot;&gt;Some content&lt;\/div&gt;<br>\r\n&lt;div class=&quot;grid_12&quot;&gt;Some content&lt;\/div&gt;<br>\r\n&lt;\/div&gt;\r\n<\/pre>\r\n\r\n<p>In this html layout the following grid classes have been used:<\/p>\r\n\r\n<pre class=\"brush:html\">\r\n.container_24 {\r\n\tmargin-left: auto;\r\n\tmargin-right: auto;\r\n\twidth: 960px;\r\n}\r\n\r\n.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12, .grid_13, .grid_14, .grid_15, .grid_16, .grid_17, .grid_18, .grid_19, .grid_20, .grid_21, .grid_22, .grid_23, .grid_24 {\r\n\tdisplay:inline;\r\n\tfloat: left;\r\n\tposition: relative;\r\n\tmargin-left: 5px;\r\n\tmargin-right: 5px;\r\n}\r\n\r\n.container_24 .grid_9 {\r\n\twidth:350px;\r\n}\r\n\r\n.container_24 .grid_12 {\r\n\twidth:470px;\r\n}\r\n\r\n.container_24 .grid_15 {\r\n\twidth:590px;\r\n}\r\n<\/pre>\r\n\r\n\r\n\r\n<p>You can also use such additional classes as: <\/p>\r\n<p><strong>.prefix_1<\/strong>, <strong>.prefix_2<\/strong> etc &#8211; defines the block left padding (the block&#8217;s indent from the left side);<\/p>\r\n<p><strong>.suffix_1<\/strong>, <strong>.suffix_2<\/strong> etc &#8211; defines the block right padding (the block&#8217;s indent from the right side);<\/p>\r\n<p><\/p>\r\n<p>More information about the grid960 system you can see at the official website at <a href=\"http:\/\/960.gs\/\">http:\/\/960.gs\/<\/a>. <\/p>\r\n<p><\/p>\r\n<p><br>\r\n<\/p>","protected":false},"excerpt":{"rendered":"<p>Browsing through the template&rsquo;s source code and styles you may have seen the classes like : &ldquo;grid_6&rdquo;, &ldquo;grid_8&rdquo;. These are the classes used by the grid 960 system. Let&rsquo;s see what this system is and what it can offer. The 960 Grid System is an effort to streamline web development workflow by providing commonly used [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":10207,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[256],"tags":[651,514,1054,517],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/10166"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=10166"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/10166\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/10207"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=10166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=10166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=10166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}