簡體   English   中英

Joomla模板-將頁腳放在底部

[英]Joomla Template - Keep footer at the bottom

我正在嘗試執行以下操作: http : //matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page但是我自己不能做,所以我尋求您的幫助。

我正在使用帶有此代碼的模板(僅適用於腳部件):

index.php:

<div class="rt-footer-surround">
    <div class="rt-container">
      <div class="rt-footer-inner">
        <?php /** Begin Footer **/ if ($gantry->countModules('footer')) : ?>
        <div id="rt-footer">
          <?php echo $gantry->displayModules('footer','standard','standard'); ?>
          <div class="clear"></div>
        </div>
        <?php /** End Footer **/ endif; ?>
        <?php /** Begin Copyright **/ if ($gantry->countModules('copyright')) : ?>
        <div id="rt-copyright">
          <?php echo $gantry->displayModules('copyright','standard','standard'); ?>
          <div class="clear"></div>
        </div>
        <?php /** End Copyright **/ endif; ?>
      </div>
    </div>
</div>

css / template.css:

/* Footer */
.backgroundlevel-high .rt-footer-surround {padding-top: 135px;}
.rt-footer-inner {border-radius: 5px 5px 0 0;position: relative;z-index: 0;margin: 0 10px;}
.rt-footer-inner:after {content: "";position: absolute;top: 0;right: 0;left: 0;bottom: 0;z-index: -1;border-radius: 5px;}
.rt-footer-inner .rt-alpha {margin-left: 0;}
.rt-footer-inner .rt-omega {margin-right: 0;}
.backgroundlevel-high #rt-bottom {margin-bottom: -50px;}
#rt-bottom {margin-bottom: 15px;}
#rt-footer, #rt-copyright {margin: 0 -2px;}
#rt-copyright {position: relative;}
#rt-copyright .rt-grid-1, #rt-copyright .rt-grid-2, #rt-copyright .rt-grid-3, #rt copyright .rt-grid-4, #rt-copyright .rt-grid-5, #rt-copyright .rt-grid-6, #rt-copyright
.rt-grid-7, #rt-copyright .rt-grid-8, #rt-copyright .rt-grid-9, #rt-copyright .rt-grid 10,   #rt-copyright .rt-grid-11, #rt-copyright .rt-grid-12 {position: static;}

css / community-a.css:

/* Footer */
.rt-footer-inner {background-color: #1CA8D2;box-shadow: inset 1px 0 0 rgba(0,0,0,0.2), inset -1px 0 0 rgba(0,0,0,0.2), 0 0 6px rgba(0,0,0,0.4);color: #fff;text-shadow: 1px -1px 1px rgba(0,0,0,0.5);}
.rt-footer-inner .module-surround, .rt-footer-inner .title {color: #fff;text-shadow: 1px -1px 1px rgba(0,0,0,0.5);}
.rt-footer-inner a {color: #BCFEFF;text-shadow: -1px -1px 1px rgba(0,0,0,0.3);}
.rt-footer-inner a:hover {color: #fff;}

“ community-a.css”是我使用的模板中的樣式表。

如果有人可以幫助我解決這個問題,我會感到很高興。

你在這里提供的信息是我的兩分錢:

在學習本教程之后,您應該將以下CSS規則應用於容器元素(應為rt-footer-surround):

.rt-footer-surround {
    position:absolute;
    bottom:0;
    width:100%;
    height:60px;   /* Height of the footer */
}

那應該可以解決問題,當然,您應該檢查是否有其他CSS規則試圖覆蓋您所做的修改,firebug或其他開發人員工具非常適合此類工作。

編輯:這樣的東西http://jsfiddle.net/4PRmk/1/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM