3

Is this possible?

So if we had a list:

  • Item 1
  • Item 2
  • Item 3
  • Item 4

Instead of

Item 1 Item 3

Item 2 Item 4

We'd want

Item 1 Item 2

Item 3 Item 4

Is this possible with the multi-column layout module or am I better off doing this with old fashioned floats or inline divs?

probablyup
  • 7,636
  • 1
  • 27
  • 40

1 Answers1

1

Like this?

<style>
  ul {list-style: none;}
  li {float: left;}
  li:nth-child(2n+1) {clear: left;} /* 1st of every twos */
</style>
<ul>
  <li>item 1</li>
  <li>item 2</li>
  <li>item 3</li>
  <li>item 4</li>
</ul>
Jay
  • 4,627
  • 1
  • 21
  • 30
  • That certainly works, but I was hoping for a property in the multi-column module to make it work instead of using floats. – probablyup Sep 21 '12 at 16:31
  • 1
    What if elements are of different heights and they can even be resized? Something like Google+ cards. Floats in this case won't work. Masonry would work, but resizing poses a completely different problem because all elements are absolutely positioned. – Robert Koritnik Oct 10 '13 at 13:47