Tizen 2.1 base
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.0.1pre / docs / buttons / buttons-inline.html
1 <!DOCTYPE html> 
2 <html> 
3         <head>
4         <meta charset="utf-8">
5         <meta name="viewport" content="width=device-width, initial-scale=1"> 
6         <title>jQuery Mobile Docs - Inline buttons</title> 
7         <link rel="stylesheet"  href="../../css/themes/default/" />  
8         <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9         <script src="../../js/jquery.js"></script>
10         <script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
11         <script src="../_assets/js/jqm-docs.js"></script>
12         <script src="../../js/"></script>
13 </head> 
14 <body> 
15
16 <div data-role="page" class="type-interior">
17
18         <div data-role="header" data-theme="f">
19                 <h1>Inline buttons</h1>
20                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
21         </div><!-- /header -->
22
23         <div data-role="content">
24                 <div class="content-primary">
25                 
26                 <p>By default, all buttons in the body content are styled as block-level element so they fill the width of the screen:</p>
27                 
28                 <a href="index.html" data-role="button">Button</a>
29                 
30                         
31                 <p>However, if you want a more compact button that is only as wide as the text and icons inside, add the <code> data-inline="true"</code> attribute to the button:</p>
32                 
33                 
34                 <a href="index.html" data-role="button" data-inline="true">Button</a>
35                 
36                 <p>If you have multiple buttons that should sit side-by-side on the same line, add the <code> data-inline="true"</code> attribute to each button. This will style the buttons to be the width of their content and float the buttons so they sit on the same line. </p>
37                         
38 <pre><code>
39 &lt;a href=&quot;index.html&quot; data-role=&quot;button&quot; data-inline=&quot;true&quot;&gt;Cancel&lt;/a&gt;
40 &lt;a href=&quot;index.html&quot; data-role=&quot;button&quot; data-inline=&quot;true&quot; data-theme=&quot;b&quot;&gt;Save&lt;/a&gt;
41 </code></pre>
42
43                 <p>The result is this:</p>
44
45                         <a href="index.html" data-role="button" data-inline="true">Cancel</a>
46                         <a href="index.html" data-role="button" data-theme="b" data-inline="true">Save</a>
47
48                 
49                 <p>If you want buttons to sit side-by-side but stretch to fill the width of the screen, you can use the <a href="../content/content-grids.html">content column grids</a> to put normal full-width buttons into 2- or 3-columns.</p>     
50                         
51                 </div><!--/content-primary -->          
52
53                 <div class="content-secondary">
54
55                         <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
56
57                                         <h3>More in this section</h3>
58
59                                         <ul data-role="listview" data-theme="c" data-dividertheme="d">
60
61                                                 <li data-role="list-divider">Buttons</li>
62                                                 <li><a href="buttons-types.html">Button basics</a></li>
63                                                 <li><a href="buttons-icons.html">Button icons</a></li>
64                                                 <li data-theme="a"><a href="buttons-inline.html">Inline buttons</a></li>
65                                                 <li><a href="buttons-grouped.html">Grouped buttons</a></li>
66                                                 <li><a href="buttons-themes.html">Theming buttons</a></li>
67
68                                         </ul>
69                         </div>
70                 </div>          
71
72         </div><!-- /content -->
73
74         <div data-role="footer" class="footer-docs" data-theme="c">
75                         <p>&copy; 2011 The jQuery Project</p>
76         </div>
77
78         </div><!-- /page -->
79
80         </body>
81         </html>