You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/content-grids.html
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ <h1>Layout grids</h1>
26
26
<p>Using multiple column layouts isn't generally recommended on a mobile device because of the narrow screen width, but there are times where you may need to place small elements side-by-side (like buttons or navigation tabs, for example). </p>
27
27
28
28
<p>The jQuery Mobile framework provides a simple way to build CSS-based columns through a block style class convention called <code>ui-grid</code>. </p>
29
+
29
30
<p>There are two preset configurations layouts — two-column (using the <code>class</code> of <code>ui-grid-a</code>), and three-column (using the <code>class</code> of <code>ui-grid-b</code>) — that can be used in any situation that requires columns. Grids are 100% width, completely invisible (no borders or backgrounds) and don't have padding or margins, so they shouldn't interfere with the styles of elements placed inside them.</p>
30
31
31
32
<h2>Two column grids</h2>
@@ -47,7 +48,7 @@ <h2>Two column grids</h2>
47
48
<divclass="ui-block-b"><strong>I'm Block B</strong> and text inside will wrap.</div>
48
49
</div><!-- /grid-a -->
49
50
50
-
<p>As you see above, by default grid blocks have no styles for appearance; they simply present content side-by-side.</p>
51
+
<p>As you see above, by default grid blocks have no visual styling; they simply present content side-by-side.</p>
51
52
52
53
<p>Grid classes can be applied to any container. In this next example, we add <code>ui-grid-a</code> to a <code>fieldset</code>, and apply the <code>ui-block</code> classes to the two buttons inside to stretch them each to 50% of the screen width:</p>
53
54
@@ -64,15 +65,15 @@ <h2>Two column grids</h2>
64
65
</fieldset>
65
66
66
67
67
-
<p>And, grid blocks can adopt presentation styles from the <ahref="../themes/index.html">theming system</a>— by adding a height and color swatch reference to the grid blocks, we can achieve this style appearance:</p>
68
+
<p>Theme classes (not data-theme attributes) from the <ahref="../themes/index.html">theming system</a>can be added to an element, including grids. On the blocks below, we're adding two classes: <code>ui-bar</code> to add the default bar padding and <code>ui-bar-e</code> to apply the background gradient and font styling for the "e" toolbar theme swatch. For illustration purposes, an inline <code>style="height:120px"</code> attribute is also added to each grid to set each to a standard height. </p>
<p>The other grid layout configuration uses <code>class=ui-grid-b</code> on the parent, and 3 child container elements, each with its respective <code>ui-block-a/b/c</code> class, to create a three-column layout (33/33/33%).</p>
76
+
<p>The other grid layout configuration uses <code>class=ui-grid-b</code> on the parent, and 3 child container elements, each with its respective <code>ui-block-a/b/c</code> class, to create a three-column layout (33/33/33%). Note: These blocks are also styled with theme classes so the grid layout is clearly visible.</p>
76
77
77
78
<pre><code>
78
79
<div class="ui-grid-b">
@@ -100,7 +101,7 @@ <h2>Three-column grids</h2>
100
101
101
102
<h2>Four-column grids</h2>
102
103
103
-
<p>A four-column, 25/25/25/25% grid is created by specifying <code>class=ui-grid-c</code> on the parent and adding a fourth block.</p>
104
+
<p>A four-column, 25/25/25/25% grid is created by specifying <code>class=ui-grid-c</code> on the parent and adding a fourth block. Note: These blocks are also styled with theme classes so the grid layout is clearly visible.</p>
<p>A five-column, 20/20/20/20/20% grid is created by specifying <code>class=ui-grid-d</code> on the parent and adding a fourth block.</p>
114
+
<p>A five-column, 20/20/20/20/20% grid is created by specifying <code>class=ui-grid-d</code> on the parent and adding a fourth block. Note: These blocks are also styled with theme classes so the grid layout is clearly visible.</p>
0 commit comments