Note that there are some explanatory texts on larger screens.

plurals
  1. POcontent auto height adjust depends on page height
    primarykey
    data
    text
    <p>I've encountered issue, where i need height of my content to be specific in pixels(for google map to show correctly). However i dont know on which devices my site will be used(cellphones, smartphones) and what screen resolution will be. I have an idea how to implement this, but since i'm using jquery mobile i'm not sure how to do that. The idea is pretty simple: get height of page and then <code>content.height = page.height-(footer.height+header.height)</code></p> <p>Here is my html code:</p> <pre><code>&lt;html&gt; &lt;body style="margin:0"&gt; &lt;div data-role="page" class="page-nearme"&gt; &lt;div data-role="header" data-id="navbar" data-position="fixed" data-tap-toggle="false"&gt;&lt;/div&gt; &lt;!-- /header --&gt; &lt;div data-role="content"&gt; &lt;div id="search-panel"&gt; &lt;input id="target" type="search" placeholder="Search Box"&gt; &lt;/div&gt; &lt;div id="map_canvas" style=""&gt;&lt;/div&gt; &lt;/div&gt; &lt;!-- tabbar --&gt; &lt;div data-role="footer" data-id="main_footer" data-position="fixed" data-fullscreen="true" data-visible-on-page-show="false" id="fxedfooter" data-tap-toggle="false" onclick="showfooter"&gt; &lt;div data-role="navbar" data-iconpos="top"&gt; &lt;ul&gt; &lt;li&gt;&lt;a id="menu-item-home" data-icon="custom" href="index.html"&gt;&amp;nbsp;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a id="menu-item-near-me" data-icon="custom" href="near-me.html" class="ui-btn-active ui-state-persist"&gt;&amp;nbsp;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a id="menu-item-rewards" data-icon="custom" href="rewards.html"&gt;&amp;nbsp;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a id="menu-item-invite" data-icon="custom" href="invite.html"&gt;&amp;nbsp;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a id="menu-item-profile" data-icon="custom" href="profile.html"&gt;&amp;nbsp;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;!-- /navbar --&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>PS i tried solution in <a href="https://stackoverflow.com/questions/8929786/jquery-mobile-page-height?rq=1">jQuery mobile page height</a> that didnt work</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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