{"id":227,"date":"2014-09-20T02:50:43","date_gmt":"2014-09-20T02:50:43","guid":{"rendered":"https:\/\/www.lianeallen.com\/home\/?p=227"},"modified":"2014-09-20T02:50:43","modified_gmt":"2014-09-20T02:50:43","slug":"auto-generated-columns-of-auto-generated-bootstrap-column-widths","status":"publish","type":"post","link":"https:\/\/www.lianeallen.com\/home\/2014\/09\/auto-generated-columns-of-auto-generated-bootstrap-column-widths\/","title":{"rendered":"Auto-Generated Columns of Auto-Generated-Bootstrap-Column-Widths"},"content":{"rendered":"<p>Well that was fun!<\/p>\n<p>Today&#8217;s task was to programmatically generate a set of columns of projects. Easy!<\/p>\n<p>Then I decided that if a column didn&#8217;t have any projects in it, it shouldn&#8217;t display. OK, that took a little more work. <\/p>\n<p>BUT that meant that the remaining columns would shift left, because of the way the bootstrap column layouts work, so, for example, if there were only 3 columns, in the 4 column wide layout, there&#8217;d be a big blank spot to the right, which was awkward. The whole point to a responsive layout is for things to align nicely, regardless of page width.<\/p>\n<p>Soooo &#8230; I coded a means to determine how many columns the bootstrap css should display based on the total number of columns generated, relative to the max columns in the view. <\/p>\n<p>And the result is what you see above!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well that was fun! Today&#8217;s task was to programmatically generate a set of columns of projects. Easy! Then I decided that if a column didn&#8217;t have any projects in it, it shouldn&#8217;t display. OK, that took a little more work. BUT that meant that the remaining columns would shift left, because of the way the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.lianeallen.com\/home\/2014\/09\/auto-generated-columns-of-auto-generated-bootstrap-column-widths\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Auto-Generated Columns of Auto-Generated-Bootstrap-Column-Widths&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":228,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-227","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts\/227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/comments?post=227"}],"version-history":[{"count":2,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts\/227\/revisions"}],"predecessor-version":[{"id":230,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts\/227\/revisions\/230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/media\/228"}],"wp:attachment":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/media?parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/categories?post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/tags?post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}