Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make jquery mobile page responsive?
    text
    copied!<p>I have the following code snippet for a login home page. I want it to be responsive. how do I make it responsive using jQuery mobile?<br> Does jqm provide any default css for it? </p> <pre><code> &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"&gt; &lt;script src="http://code.jquery.com/jquery-1.8.3.min.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="./css/custom.css"&gt; &lt;/head&gt; &lt;body&gt; &lt;div data-role="page" id="pageone"&gt; &lt;div data-role="content"&gt; &lt;img src="./imgs/abc.jpg"&gt; &lt;div class="ui-grid-a"&gt; &lt;div class="ui-block-a"&gt;&lt;img src="./imgs/home.jpg"&gt; &lt;/div&gt; &lt;div class="ui-block-b"&gt; &lt;form id="HLogin" method="POST"&gt; &lt;div data-role="fieldcontain"&gt; &lt;label for="url"&gt;Username:*&lt;/label&gt; &lt;input class="required" id="Lusername" name="uid_r" type="text" value=""&gt; &lt;/div&gt; &lt;div data-role="fieldcontain"&gt; &lt;label for="url"&gt;Password:*&lt;/label&gt; &lt;input id="Lpassword" name="pwd_r" type="password" value=""&gt; &lt;/div&gt; &lt;button data-theme="b" type="submit"&gt;Login&lt;/button&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; custom.css: .ui-block-a { width:70% !important; } .ui-block-b { width:30% !important; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload