mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-28 09:54:44 +00:00
improved inline btn docs for patty to re-write
This commit is contained in:
parent
458d905095
commit
922e27adbe
1 changed files with 13 additions and 3 deletions
|
|
@ -16,16 +16,26 @@
|
|||
|
||||
<div data-role="content">
|
||||
|
||||
<p>If you have multiple buttons that should sit side-by-side on the same line instead of stacked like the default buttons, wrap the buttons in a container that has a <code>data-inline="true"</code> attribute. This will style the buttons to be the width of their content and float the buttons so they sit on the same line. </p>
|
||||
<p>By default, all buttons in the body content are styled as block-level element so they fill the width of the screen:</p>
|
||||
|
||||
<a href="index.html" data-role="button">Button</a>
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<a href="index.html" data-role="button" data-inline="true">Button</a>
|
||||
|
||||
<p>If you have multiple buttons that should sit side-by-side on the same line, wrap the buttons in a container that has a <code>data-inline="true"</code> attribute. This will style the buttons to be the width of their content and float the buttons so they sit on the same line. </p>
|
||||
|
||||
<pre><code>
|
||||
<div data-inline="true">
|
||||
<a href="index.html" data-role="button">Cancel</a>
|
||||
<a href="index.html" data-role="button">Save</a>
|
||||
<a href="index.html" data-role="button" data-theme="b">Save</a>
|
||||
</div>
|
||||
</pre></code>
|
||||
|
||||
<p><strong>Inline</strong> buttons</p>
|
||||
<p>This creates an inline button set:</p>
|
||||
|
||||
<a href="index.html" data-role="button" data-inline="true">Cancel</a>
|
||||
<a href="index.html" data-role="button" data-theme="b" data-inline="true">Save</a>
|
||||
|
|
|
|||
Loading…
Reference in a new issue