Bootstrap Tutorial - Create condensed table








The following code shows how to create condensed table.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='/js/lib/mootools-core-1.4.5-nocompat.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap.min.css">
<style type='text/css'>
.table td, .table th {<!-- ww w  .  j a  va2 s  .co  m-->
  border: none;
}

table.table.table-condensed {
  border: 1px solid black;
}
</style>
</head>
<body style='margin:30px'>
  <table class="table table-condensed">
    <thead>
      <tr>
        <th>h1</th>
        <th>h2</th>
        <th>h3</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
      </tr>
      <tr>
        <td>4</td>
        <td>5</td>
        <td>6</td>
      </tr>
      <tr>
        <td>7</td>
        <td>8</td>
        <td>9</td>
      </tr>
    </tbody>
    <table>
</body>
</html>

Click to view the demo