我想我的手在jQuery Mobile上,我覺得它有點令人困惑,因爲它是一個標記驅動的框架。jQuery移動按鈕對齊問題
我創建了一個測試頁,其中我只是試圖將一個按鈕對齊到右側,但我無法做到這一點。我試過float: right
但它不工作。雖然margin-left
正在通過提供特定百分比來工作,但在調整頁面大小時不起作用。
這是我的Fiddle code。任何幫助都會很棒。
<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>
感謝you..Yeah,做了trick.I不知道爲什麼我沒有想到這一點。 – karthick 2013-03-27 09:37:24
如果答案幫助您考慮將其標記爲正確答案。 – 2013-03-27 09:40:36