{"id":92,"date":"2011-02-27T19:38:37","date_gmt":"2011-02-27T19:38:37","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=92"},"modified":"2011-02-27T19:38:58","modified_gmt":"2011-02-27T19:38:58","slug":"two-column-list-html-cs","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/two-column-list-html-cs\/","title":{"rendered":"Two column list &#8211; the elegant way"},"content":{"rendered":"<p>If you have two individual lists, instead of stacking them, you&#39;ll be able reduce scrolling by placing them side-by-side. The example below demonstrates one elegant way to achieve this.<\/p>\n<h3>The HTML<\/h3>\n<pre id=\"line231\"><code>&lt;<span class=\"start-tag\">div<\/span><span class=\"attribute-name\"> class<\/span>=<span class=\"attribute-value\">&quot;list-columns&quot;<\/span>&gt;\r\n  &lt;<span class=\"start-tag\">ul<\/span>&gt;\r\n    &lt;<span class=\"start-tag\">li<\/span>&gt;Item 1&lt;\/<span class=\"end-tag\">li<\/span>&gt;\r\n    &lt;<span class=\"start-tag\">li<\/span>&gt;Item 2&lt;\/<span class=\"end-tag\">li<\/span>&gt;\r\n  &lt;\/<span class=\"end-tag\">ul&gt;<\/span>\r\n  &lt;<span class=\"start-tag\">ul<\/span>&gt;\r\n    &lt;<span class=\"start-tag\">li<\/span>&gt;Item 3&lt;\/<span class=\"end-tag\">li<\/span>&gt;\r\n    &lt;<span class=\"start-tag\">li<\/span>&gt;Item 4&lt;\/<span class=\"end-tag\">li<\/span>&gt;\r\n  &lt;\/<span class=\"end-tag\">ul<\/span>&gt;\r\n&lt;\/<span class=\"end-tag\">div<\/span>&gt;\r\n<\/code><\/pre>\n<h3>The CSS<\/h3>\n<p><code>.list-columns ul { float: right; }<br \/>\n\t.list-columns ul:first-child { float: left; }<br \/>\n\t<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have two individual lists, instead of stacking them, you&#39;ll be able reduce scrolling by placing them side-by-side. The example below demonstrates one elegant&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[12,14],"tags":[39,38],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/92"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=92"}],"version-history":[{"count":2,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":94,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions\/94"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}