Thus far we have only seen grids with a single row. To add an additional row, simply repeat the block pattern of the first row for each consecutive row (see Figure 6–6 and its related code in Listing 6–6). The resulting grid contains five columns and three rows. The columns are evenly spaced and you may manually adjust the row height at the block component.

images

Figure 6–6. Multi-row grid

Listing 6–6. Multi-row grid (ch6/grid-multi-row.html)<div data-role="content">
  <div class="ui-grid-d" style="text-align: center;">

    <!-- First row -->
    <div class="ui-block-a">&#xe21c;</div>
    <div class="ui-block-b">&#xe21d;</div>
    <div class="ui-block-c">&#xe21e;</div>
    <div class="ui-block-d">&#xe21f;</div>
    <div class="ui-block-e">&#xe220;</div>
    <!-- Second row -->
    <div class="ui-block-a">&#xe002;</div>
    <div class="ui-block-b">&#xe005;</div>
    <div class="ui-block-c">&#xe51a;</div>
    <div class="ui-block-d">&#xe515;</div>
    <div class="ui-block-e">&#xe152;</div>

  </div>
</div>

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *