Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to properly use % to resize div dynamically?
    text
    copied!<p><a href="http://i.imgur.com/mFtXm.jpg" rel="nofollow">http://i.imgur.com/mFtXm.jpg</a> here is a screenshot.</p> <p>The areas marked in red are where the problems are. When I view the page in firefox it looks fine, in chrome there are tiny gaps, I don't deal with ie.</p> <p>What is the correct way to size these divs such that each div will "connect" with other divs without leaving any gaps whenever the browser changes? something with jquery or js?</p> <p>html:</p> <pre class="lang-html prettyprint-override"><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;link rel="stylesheet" href="./css/main.css" /&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="header"&gt; &lt;h1&gt;New York Tech Map&lt;/h1&gt; &lt;/div&gt; &lt;div id="navlinks"&gt; &lt;div class="topnav"&gt; &lt;a href=""&gt;About Us&lt;/a&gt; &lt;/div&gt; &lt;div class="topnav"&gt; &lt;a href=""&gt;Contact Us&lt;/a&gt; &lt;/div&gt; &lt;div class="topnav"&gt; &lt;a href=""&gt;Sign Up&lt;/a&gt; &lt;/div&gt; &lt;div class="topnav"&gt; &lt;a href=""&gt;Help&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="sidebar"&gt; &lt;/div&gt; &lt;div id="map"&gt; &lt;/div&gt; &lt;div id="footer"&gt; &amp;copy; 2012 NYC Tech Map &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>css:</p> <pre class="lang-css prettyprint-override"><code>html, body { margin: 0; padding: 0; height: 100%; background: #F0F0F0; } a { text-decoration: none; color: grey; } a:hover{ color: red; } #header { width: 100%; height: 75px; background: red; margin-top: -21px; } #navlinks { float: right; width: 80%;} .topnav { width: 25%; height: 25px; float: left; padding-top: 5px; background: #2D2D2D; text-align: center; font-family: arial, sans serif; font-size: 15px; font-weight: bold; } #sidebar { width: 20%; height: 500px; float: left; background: blue; } #map { height: 80.8%; width: 80%; float: right; } . .popa:hover { background: #D6D6D6; } #footer { position: absolute; bottom: 0; width: 100%; height: 25px; background: #2D2D2D; text-align: center; font-family: arial, sans serif; font-weight: bold; padding-top: 5px; color: grey; } </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