title: Css display 3 foreach results per row
body: <p>I have this asp.net code:</p>
  
  <pre><code> @foreach( var database in Model)
   {
  
          if (!(firstTime == database.DB))
          {
            &lt;h3&gt; @database.DB &lt;/h3&gt;
          }
  
             &lt;div class="logContainer" onclick="location.href='/logs/Details?databaseID=@database.DB&amp;exceptionName=@database.Exception&amp;exceptionsOccurred=@database.Count';"&gt;
                  &lt;div class="counter"&gt;&lt;b&gt;@database.Count&lt;/b&gt;&lt;/div&gt; 
                  &lt;div class="exceptionName"&gt; Exceptions of Type: @database.Exception&lt;/div&gt;
                  &lt;div class="date"&gt;Siste: @database.LastOccurred&lt;/div&gt;
           &lt;hr /&gt;   &lt;/div&gt;
  
  
       firstTime = database.DB; 
  }
  </code></pre>
  
  <p>And this CSS:</p>
  
  <pre><code>.logContainer
  {
   width:500px;
  
  }
  
  .logContainer:hover 
  {
  cursor:pointer;
  background-color:#ffffcc;
  }
  
  
  .counter {
  height: 30px;
  width:35px;
  float:left;
  background: none repeat scroll 0 0 #E6FFDC;
  border: 1px solid #BBDD66;
  text-align:center;
  vertical-align:middle; 
  line-height:1.5em;
  font-size:1.5em;
  }
  
  .exceptionName
  {
  width:200px;
  display:inline;
  padding-left: 10px;
  display: inline;
  }
  
  .date
  {
  font-size: 0.9em;
  color:gray;
  width:200px;
  padding-left: 47px; 
  }
  </code></pre>
  
  <p>What it does is to display the ouput row per row, and when the Dabase.DB changes it writes it and start again.</p>
  
  <p>What I want is to display the output horizontally having 3 logcontainer per row, and if I encounter a new database.DB break it, write the name of the database and start from the left.</p>
  
  <p>How should I do modify the code to do it?</p>