{"id":57,"date":"2013-03-22T17:17:44","date_gmt":"2013-03-22T13:47:44","guid":{"rendered":"http:\/\/paiwar-alarm.com\/new\/2013\/03\/22\/grid-positions-structure\/"},"modified":"2013-03-22T17:17:44","modified_gmt":"2013-03-22T13:47:44","slug":"grid-positions-structure","status":"publish","type":"post","link":"http:\/\/paiwar-alarm.com\/en\/?p=57","title":{"rendered":"Grid positions\/Structure"},"content":{"rendered":"<p>You can see more details on <a href=\"http:\/\/twitter.github.com\/bootstrap\/scaffolding.html#gridSystem\" target=\"_blank\" rel=\"noopener\">http:\/\/twitter.github.com\/bootstrap\/scaffolding.html#gridSystem<\/a><\/p>\n<h2>Live grid example<\/h2>\n<p>The default Bootstrap grid system utilizes <strong>12 columns<\/strong>, making for a 940px wide container without <a href=\"http:\/\/twitter.github.com\/bootstrap\/scaffolding.html#responsive\">responsive features<\/a> enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.<\/p>\n<div class=\"bs-docs-grid\">\n<div class=\"row show-grid\">\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<\/div>\n<div class=\"row show-grid\">\n<div class=\"span2\">2<\/div>\n<div class=\"span3\">3<\/div>\n<div class=\"span4\">4<\/div>\n<div class=\"span3\">3<\/div>\n<\/div>\n<div class=\"row show-grid\">\n<div class=\"span5\">5<\/div>\n<div class=\"span6\">6<\/div>\n<div class=\"span1\">1<\/div>\n<\/div>\n<div class=\"row show-grid\">\n<div class=\"span12\">12<\/div>\n<\/div>\n<\/div>\n<h3>Basic grid HTML<\/h3>\n<p>For a simple two column layout, create a <code>.row<\/code> and add the appropriate number of <code>.span*<\/code> columns. As this is a 12-column grid, each <code>.span*<\/code> spans a number of those 12 columns, and should always add up to 12 for each row (or the number of columns in the parent).<\/p>\n<pre class=\"prettyprint linenums\">&lt;div class=\"row\"&gt;\r\n  &lt;div class=\"span4\"&gt;...&lt;\/div&gt;\r\n  &lt;div class=\"span8\"&gt;...&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>Given this example, we have <code>.span4<\/code> and <code>.span8<\/code>, making for 12 total columns and a complete row.<\/p>\n<h3>SHORCODE DEMOS<\/h3>\n<p>The shortcode is quite simple Attach the cols number near grid. <strong>Keep in mind you must use the row shortcode.<\/strong><\/p>\n<div class=\"bs-docs-example\">[show_shortcode][grid 1\/2\/3\/4\/5\/6\/7\/8\/9\/10\/11\/12]&#8230;[\/grid][\/show_shortcode]<\/div>\n<pre class=\"prettyprint linenums\">[show_shortcode]\r\n[row]\r\n  [grid 2]\r\n    ...\r\n  [\/grid]\r\n\r\n  [grid 10]\r\n    ...\r\n  [\/grid]\r\n[row]\r\n[\/show_shortcode]\r\n<\/pre>\n<p>You can also use the grid shortcodes like this:<\/p>\n<div class=\"bs-docs-example\">[show_shortcode][grid3 first\/last]&#8230;[\/grid3][\/show_shortcode]<\/div>\n<pre class=\"prettyprint linenums\">[show_shortcode]\r\n[grid2 first]\r\n    ...\r\n[\/grid2]\r\n\r\n[grid10 last]\r\n    ...\r\n[\/grid10]\r\n[\/show_shortcode]\r\n<\/pre>\n<p>Other examples:<\/p>\n<div class=\"bs-docs-example\">\n<p>[show_shortcode][onethird first\/last]&#8230;[\/onethird][\/show_shortcode]<\/p>\n<p>\u00a0<\/p>\n<p>[show_shortcode][twothirds first\/last]&#8230;[\/twothirds][\/show_shortcode]<\/p>\n<p>\u00a0<\/p>\n<p>[show_shortcode][half first\/last]&#8230;[\/half][\/show_shortcode]<\/p>\n<\/div>\n<h2>Offsetting columns<\/h2>\n<p>Move columns to the right using <code>.offset*<\/code> classes. Each class increases the left margin of a column by a whole column. For example, <code>.offset4<\/code> moves <code>.span4<\/code> over four columns.<\/p>\n<div class=\"bs-docs-grid\">\n<div class=\"row show-grid\">\n<div class=\"span4\">4<\/div>\n<div class=\"span3 offset2\">3 offset 2<\/div>\n<div class=\"span2 offset1\">2 offset 1<\/div>\n<\/div>\n<p><!-- \/row --><\/p>\n<div class=\"row show-grid\">\n<div class=\"span3 offset1\">3 offset 1<\/div>\n<div class=\"span3 offset2\">3 offset 2<\/div>\n<div class=\"span1 offset2\">1 offset 2<\/div>\n<\/div>\n<p><!-- \/row --><\/p>\n<div class=\"row show-grid\">\n<div class=\"span6 offset3\">6 offset 3<\/div>\n<div class=\"span2 offset1\">2 offset 1<\/div>\n<\/div>\n<p><!-- \/row --><\/div>\n<pre class=\"prettyprint linenums\">&lt;div class=\"row\"&gt;\r\n  &lt;div class=\"span4\"&gt;...&lt;\/div&gt;\r\n  &lt;div class=\"span3 offset2\"&gt;...&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<h2>Nesting columns<\/h2>\n<p>To nest your content with the default grid, add a new <code>.row<\/code> and set of <code>.span*<\/code> columns within an existing <code>.span*<\/code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.<\/p>\n<div class=\"row show-grid\">\n<div class=\"span9\">Level 1 column<\/p>\n<div class=\"row show-grid\">\n<div class=\"span6\">Level 2<\/div>\n<div class=\"span3\">Level 2<\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre class=\"prettyprint linenums\">&lt;div class=\"row\"&gt;\r\n  &lt;div class=\"span9\"&gt;\r\n    Level 1 column\r\n    &lt;div class=\"row\"&gt;\r\n      &lt;div class=\"span6\"&gt;Level 2&lt;\/div&gt;\r\n      &lt;div class=\"span3\"&gt;Level 2&lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<div class=\"page-header\">\n<h1>Fluid grid system<\/h1>\n<\/div>\n<h2>Live fluid grid example<\/h2>\n<p>The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.<\/p>\n<div class=\"bs-docs-grid\">\n<div class=\"row-fluid show-grid\">\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<div class=\"span1\">1<\/div>\n<\/div>\n<div class=\"row-fluid show-grid\">\n<div class=\"span4\">4<\/div>\n<div class=\"span4\">4<\/div>\n<div class=\"span4\">4<\/div>\n<\/div>\n<div class=\"row-fluid show-grid\">\n<div class=\"span4\">4<\/div>\n<div class=\"span8\">8<\/div>\n<\/div>\n<div class=\"row-fluid show-grid\">\n<div class=\"span6\">6<\/div>\n<div class=\"span6\">6<\/div>\n<\/div>\n<div class=\"row-fluid show-grid\">\n<div class=\"span12\">12<\/div>\n<\/div>\n<\/div>\n<h3>Basic fluid grid HTML<\/h3>\n<p>Make any row &#8220;fluid&#8221; by changing <code>.row<\/code> to <code>.row-fluid<\/code>. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.<\/p>\n<pre class=\"prettyprint linenums\">&lt;div class=\"row-fluid\"&gt;\r\n  &lt;div class=\"span4\"&gt;...&lt;\/div&gt;\r\n  &lt;div class=\"span8\"&gt;...&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<h2>Fluid offsetting<\/h2>\n<p>Operates the same way as the fixed grid system offsetting: add <code>.offset*<\/code> to any column to offset by that many columns.<\/p>\n<div class=\"bs-docs-grid\">\n<div class=\"row-fluid show-grid\">\n<div class=\"span4\">4<\/div>\n<div class=\"span4 offset4\">4 offset 4<\/div>\n<\/div>\n<p><!-- \/row --><\/p>\n<div class=\"row-fluid show-grid\">\n<div class=\"span3 offset3\">3 offset 3<\/div>\n<div class=\"span3 offset3\">3 offset 3<\/div>\n<\/div>\n<p><!-- \/row --><\/p>\n<div class=\"row-fluid show-grid\">\n<div class=\"span6 offset6\">6 offset 6<\/div>\n<\/div>\n<p><!-- \/row --><\/div>\n<pre class=\"prettyprint linenums\">&lt;div class=\"row-fluid\"&gt;\r\n  &lt;div class=\"span4\"&gt;...&lt;\/div&gt;\r\n  &lt;div class=\"span4 offset2\"&gt;...&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<h2>Fluid nesting<\/h2>\n<p>Nesting with fluid grids is a bit different: the number of nested columns should not match the parent&#8217;s number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.<\/p>\n<div class=\"row-fluid show-grid\">\n<div class=\"span12\">Fluid 12<\/p>\n<div class=\"row-fluid show-grid\">\n<div class=\"span6\">Fluid 6<\/div>\n<div class=\"span6\">Fluid 6<\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre class=\"prettyprint linenums\">&lt;div class=\"row-fluid\"&gt;\r\n  &lt;div class=\"span12\"&gt;\r\n    Fluid 12\r\n    &lt;div class=\"row-fluid\"&gt;\r\n      &lt;div class=\"span6\"&gt;Fluid 6&lt;\/div&gt;\r\n      &lt;div class=\"span6\"&gt;Fluid 6&lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>[prettyprint_script]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can see more details on http:\/\/twitter.github.com\/bootstrap\/scaffolding.html#gridSystem Live grid example The default Bootstrap grid system utilizes 12 columns, making for a 940px wide container without responsive features enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-57","post","type-post","status-publish","format-standard","hentry","category-site-content"],"_links":{"self":[{"href":"http:\/\/paiwar-alarm.com\/en\/index.php?rest_route=\/wp\/v2\/posts\/57","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/paiwar-alarm.com\/en\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/paiwar-alarm.com\/en\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/paiwar-alarm.com\/en\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/paiwar-alarm.com\/en\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=57"}],"version-history":[{"count":0,"href":"http:\/\/paiwar-alarm.com\/en\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions"}],"wp:attachment":[{"href":"http:\/\/paiwar-alarm.com\/en\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/paiwar-alarm.com\/en\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/paiwar-alarm.com\/en\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}