Note that there are some explanatory texts on larger screens.

plurals
  1. POIssues with a function to resize container
    primarykey
    data
    text
    <p>I am working on a Joomla 2.5 template and have three s top,container, and footer. Since i had so many problems getting "container" to be a min-height:100%, i relied on jquery. The code i am using is working fine except that on pages that require scrolling a white transparency covers the content that was below the initial view (so everything from the scroll bar down.) Example can be viewed at <a href="http://development.aycdesign.net/skin/treatments/it-works" rel="nofollow">http://development.aycdesign.net/skin/treatments/it-works</a></p> <p>here is the code</p> <p>part 1: index.php</p> <pre><code>&lt;?php defined('_JEXEC') or die; JHTML::_('behavior.framework', true); $app = JFactory::getApplication(); ?&gt; &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" xml:lang="en" lang="en" &gt; &lt;head&gt; &lt;jdoc:include type="head" /&gt; &lt;link rel="stylesheet" href="../&lt;?php echo $this-&gt;baseurl ?&gt;/templates/&lt;?php echo $this-&gt;template ?&gt;/css/default.css" type="text/css" /&gt; &lt;link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /&gt; &lt;meta http-equiv="content-type" content="text/html;charset=utf-8" /&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; //Initial load of page $(document).ready(sizeContent); //Every resize of window $(window).resize(sizeContent); function sizeContent() { var contentHeight = $("#container").height(); var newHeight = $("html").height() - $("#top").height() - $("#footer").height(); if (contentHeight &lt; newHeight) { $("#container").css("height", newHeight + "px"); } } &lt;/script&gt; &lt;/head&gt; &lt;html&gt; &lt;body&gt; &lt;?php if($this-&gt;countModules('top')) : ?&gt; &lt;div id="top"&gt; &lt;jdoc:include type="modules" name="top" style="none"/&gt; &lt;/div&gt; &lt;?php endif; ?&gt; &lt;?php if($this-&gt;countModules('mnav')) : ?&gt; &lt;div id="mnav"&gt; &lt;jdoc:include type="modules" name="mnav" style="none"/&gt; &lt;/div&gt; &lt;?php endif; ?&gt; &lt;div id="container"&gt; &lt;jdoc:include type="component" /&gt; &lt;/div&gt; &lt;?php if($this-&gt;countModules('footer')) : ?&gt; &lt;div id="footer"&gt; &lt;jdoc:include type="modules" name="footer" style="none"/&gt; &lt;/div&gt; &lt;?php endif; ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>part 2: default.css</p> <pre><code>/* ******************************************************************** */ /* Wire Frame */ /* ******************************************************************** */ html,body,div,span,ul,ol,dl,li,dt,dd,h1,h2,h3,h4,h5,h6,form,fieldset,label,input,textarea,p,th,td { margin:0; padding:0; } html, body { height: 100%; background: rgba(0,0,0,.5); color: #FFF; text-align: center; font-family: arial narrow, sans-serif; font-size: .9em; line-height: 1.35; letter-spacing: 1.75px } #top { background: rgb(0,0,0); color: rgb(255,255,255); } #top .custom { text-align: right; margin: 0 auto; width: 80%; max-width: 1280px; padding: .5em 0 .5em 0; } #container { background: rgba(0,0,0,.3); text-align: left; margin-right: auto; margin-left: auto; width: 80%; max-width: 1280px; } #footer { background: rgb(0,0,0); color: rgb(255,255,255); } #footer .custom { text-align: right; margin: 0 auto; width: 80%; max-width: 1280px; padding: .5em 0 .5em 0; } /* ******************************************************************** */ /* HTML */ /* ******************************************************************** */ a, a:visited, a:hover { color: #cf3f57; text-decoration: underline; } a img { border: none; } li { margin-left: 0; list-style-position: inside; } h1, h2, h3 { color: #cf3f57; text-transform: uppercase; margin-bottom: 5px; letter-spacing: -1px; line-height: 1.15em; } fieldset { border: none; } input { padding: 5px; margin: 10px 10px 10px 0; border: none; } input.button { padding: 5px; border: none; background: #252525; color: #AEAEAE; } .search label { display: none; } /* ******************************************************************** */ /* Joomla Elements */ /* ******************************************************************** */ .readmore { color: #000; background: url('../images/read_more.png') no-repeat; margin-top: 10px; padding: 5px 0 5px 10px; } .readmore a{ color: #000; font-weight: bold; text-transform: uppercase; text-decoration: none; } .blog-featured h1, .item-page h1 { display: none; } ul.actions li { list-style: none; display: inline; padding: 5px; } .item.column-1, .item.column-2, .item.column-3 { padding: 10px; } .archive, .userdata, .search, .item-page, .items-leading, .item.column-1, .item.column-2, .item.column-3 { padding: 12em 1em 1em 1em; } .items-more { margin-left: 20px; } .items-more ol { padding-bottom: 10px; } .items-more li { display: inline; padding-right: 5px; } .pagination { margin-left: 20px; margin-bottom: 10px; } .pagination-start { margin-left: -10px; } .pagination li{ display: inline; padding: 0 10px; } .counter { margin-bottom: 5px; } .archive-items, .moduletable li { margin-bottom: 5px; list-style: none; } .moduletable { padding: 10px; } .article-info { padding: 10px; } .archive h2 { display: none; } .intro, .filters { margin-bottom: 10px; } /* ******************************************************************** */ /* Joomla Blog Elements */ /* ******************************************************************** */ .cols-1 { display: block; float: none !important; margin: 0 !important; } .cols-2 .column-1 { float: left; width: 46%; } .cols-2 .column-2 { float: right; margin: 0; width: 46%; } .cols-3 .column-1 { float: left; margin-right: 4%; width: 27%; } .cols-3 .column-2 { float: left; margin-left: 0; width: 27%; } .cols-3 .column-3 { float: right; width: 27%; } .items-row { margin-bottom: 0px !important; overflow: visible; } .column-1, .column-2, .column-3 { } .column-2 { margin-left: 40%; width: 55%; } .column-3 { width: 30%; } .blog-more { padding: 10px 5px; } /* ******************************************************************** */ /* Main Menu */ /* ******************************************************************** */ #mnav .moduletable { margin: 0; padding: 0; } #mnav { width: 100%; padding: .5em 0 .5em 0; background: rgba(255, 255, 255, 0.5); position: absolute; top: 3em; z-index: 1000; } #mnav ul { width: 80%; max-width: 1280px; margin: 0 auto; padding: 0; } #mnav ul li:first-child { margin: 0; padding: 0; } #mnav ul li { margin-top: 3.5em; list-style: none; float: left; position: relative; } #mnav ul li a { display: block; padding: 0 1em; color: rgb(17, 17, 20); font-size: 1.25em; text-decoration: none; text-transform: uppercase; } #mnav ul li a:hover { color: rgb(207,63,87); } #mnav ul li ul { position: absolute; left: -1999em; } #mnav ul li:hover ul, #menu ul li.parent ul { left: 0; } #mnav ul li ul li { width: 20em; margin: 0; } #mnav ul li:hover ul li { background: none; } #mnav ul li:hover ul li a, #mnav ul li ul li a { margin-top: .1em; margin-bottom: .1em; background: rgba(255,255,255,0.5); padding: .7em 1em .7em 1em; font-size: .8em; } #mnav ul li ul li a:hover, #mnav ul li.active ul li a:hover { color: rgb(207,63,87); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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. 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