Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Alas, I've got it working. do the following changes.</p> <p>1) Since the footer is out of the flow , bring it ouside div#content and put it after it.</p> <p>2) change the css of div#content as follows</p> <pre><code>div#content{ border-right:1px solid #CCCCCC; bottom:0; float:left; overflow:hidden; padding-bottom:108px; margin-top:148px; position:absolute; top:0; width:70%; } </code></pre> <p><strong>NOTE:</strong> The padding top and padding bottom will be fixed as your headers and footers have fixed height. This will fail if they have percentage values as well!</p> <p>3)Change the css of div#container</p> <pre><code>div#container{ background:none repeat scroll 0 0 #FFFFFF; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; height:100%; margin:0 auto; min-height:100%; overflow:hidden; position:relative; width:960px; } </code></pre> <p>Only overflow:hidden is added.</p> <p>Here is the entire page:-</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt;&lt;title&gt;Google map test&lt;/title&gt; &lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt; &lt;style type="text/css"&gt; html,body { margin:0; padding:0; height:100%; /* needed for container min-height */ background:fff; font-family:arial,sans-serif; font-size:small; color:#666; } h1 { font:1.5em georgia,serif; margin:0.5em 0; } h2 { font:1.25em georgia,serif; margin:0 0 0.5em; } div#container { background:none repeat scroll 0 0 #FFFFFF; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; height:100%; margin:0 auto; min-height:100%; overflow:hidden; position:relative; width:960px; /*height:auto !important; real browsers */ height:100%; /* IE6: treaded as min-height*/ min-height:100%; /* real browsers */ } div#header { border-bottom:1px solid #ccc; border-left:1em solid #ccc; height:108px; position:relative; } div#header h1 { position:absolute; bottom: 0; left:0.5em; } div#header2 { border-bottom:1px solid #ccc; border-left:1em solid #999; height: 40px; position: relative; } div#header2 p { position:absolute; bottom: 0; left:0.5em; } div#headerInternal { border-bottom:1px solid #ccc; border-left:1em solid #cc3300; height: 40px; position: relative; } div#headerInternal p { position:absolute; bottom: 0; left:0.5em; } div#headerInternal2 { height: 40px; position: relative; } div#headerInternal2 p { position:absolute; bottom: 0; left:0.5em; } div#rightCol { float:right; width:29%; padding-bottom:5em; /* bottom padding for footer */ } div#content{ border-right:1px solid #CCCCCC; bottom:0; float:left; overflow:hidden; padding-bottom:108px; margin-top:148px; position:absolute; top:0; width:70%; } div#content p { } div#footer { position:absolute; clear:both; width:100%; height:40px; bottom:0; /* stick to bottom */ background:#fff; border-top:1px solid #ccc; } div#footer p { padding:1em; margin:0; } .paddedContent { height:100%; margin: 1em; } &lt;/style&gt; &lt;script type="text/javascript"&gt; function initialize() { var latlng = new google.maps.LatLng(52.397, 1.644); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } &lt;/script&gt; &lt;/head&gt; &lt;body onload="initialize()"&gt; &lt;div id="container"&gt; &lt;div id="header"&gt; &lt;h1&gt;Title here...&lt;/h1&gt; &lt;/div&gt; &lt;div id="header2"&gt; &lt;p&gt;Secondary menu...&lt;/p&gt; &lt;/div&gt; &lt;div id="rightCol"&gt; &lt;div id="headerInternal2"&gt; &lt;p&gt;Right Header&lt;/p&gt; &lt;/div&gt; &lt;p class="paddedContent"&gt;This is the right column&lt;/p&gt; &lt;/div&gt; &lt;div id="content"&gt; &lt;div id="headerInternal"&gt; &lt;p&gt;Page Context Menu&lt;/p&gt; &lt;/div&gt; &lt;div class="paddedContent"&gt; &lt;div id="map_canvas" style="width: 100%; height: 100%;"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="footer"&gt; &lt;p&gt;This footer is absolutely positioned&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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