title: ASP.NET MVC3 Template. Trying to split data into three columns
body: <p>I think this is a really simple questions, but I'm new to ASP.NET MVC.</p>
  
  <p>I retrieve the data from the model, but I want to split it up into three columns of equal length, or as close to equal length as possible.</p>
  
  <p>These for-loops aren't doing the trick, so I'm a little bit lost as to how to best do this in the template.</p>
  
  <p>Thanks.</p>
  
  <p><img src="https://i.stack.imgur.com/LkrVE.png" alt="enter image description here"></p>
  
  <p>EDIT: I solved it in a much better way. It can be done in css like this:</p>
  
  <pre><code>    &lt;div class="topic_content"&gt;
          &lt;div&gt;
          &lt;ul&gt;
              @for (int i = 0; i &lt; Model.Topics.Length; i++)
              {
                  &lt;li&gt;&lt;a href="javascript:void(0)" class="company_topic" data-popularity="@Model.Topics[i].Popularity" data-topicId="@Model.Topics[i].Id"&gt;@Model.Topics[i].Name.ToLower()&lt;/a&gt;&lt;/li&gt;
              }
          &lt;/ul&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  </code></pre>
  
  <p>And then in CSS I set:</p>
  
  <pre><code>.topic_content ul { width: 100%; }
  .topic_content ul li { list-style: none; text-align: left; float:left; width:33%; }
  </code></pre>