我正在尝试使用jQuery Mobile,但我发现它有点困惑,因为它是一个标记驱动的框架。
我创建了一个测试页面,只想将一个按钮对齐到右边,但我无法做到。我尝试使用
这是我的代码。任何帮助都将不胜感激。
我创建了一个测试页面,只想将一个按钮对齐到右边,但我无法做到。我尝试使用
float:right
,但它不起作用。虽然通过给定特定百分比的margin-left
可以工作,但当我调整页面大小时,同样的代码却不起作用。这是我的代码。任何帮助都将不胜感激。
<div data-role="page">
<div data-role="header" data-theme="b" data-position="fixed">
<h1 style="font-size: 1.5em; text-align: left; margin-left: 70px;"
data-role="none">Test</h1>
</div>
<div id="contentLogin" align="center" name="contentConfirmation" data-role="content">
<p style="font-size: 0.85em; color: #000000">
<b>Welcome to my page</b>
</p>
<br>
<div class="ui-grid-b responsive">
<div style="margin: 0px; margin-top: 0px; margin: 0px;" class="ui-block-a">
<div data-role="fieldcontain">
<label for="url" class="alignleft">Username:*</label>
<input id="userId1" class="required" name="uid_r" placeholder="" type="text">
</div>
<div data-role="fieldcontain">
<label for="url" class="alignleft">Password:*</label>
<input id="Password1" class="required" name="pwd_r" value="" type="password">
</div>
<button id="login" data-theme="a" type="button" href="home.html" data-mini="false" data-inline="true" >Login</button>
</div>
<div class="ui-block-b">BLOCK A ADS</div>
<div class="ui-block-c" style="margin-top: 0px;">
BLOCK C
</div>
</div>
</div>
<div data-role="footer" data-theme="b" data-position="fixed">
</div>
</div>