CSS Layout How to - Order results in table row








Question

We would like to know how to order results in table row.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
ul {<!-- ww w.  ja va  2 s .  c o m-->
  list-style: none;
  width: 300px;
}

li {
  float: left;
  width: 30%;
  border: 1px solid #000;
}
</style>
</head>
<body>
  <ul>
    <li>Dressing 1</li>
    <li>Dressing 2</li>
    <li>Dressing 3</li>
    <li>Dressing 4</li>
    <li>Dressing 5</li>
    <li>Dressing 6</li>
    <li>Dressing 7</li>
    <li>Dressing 8</li>
    <li>Dressing 9</li>
  </ul>
</body>
</html>

The code above is rendered as follows: