Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 粘脚不在正确的位置_Html_Css_Twitter Bootstrap - Fatal编程技术网

Html 粘脚不在正确的位置

Html 粘脚不在正确的位置,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我正在制作一个多页面的网站,我在每个页面上都包含一个导航栏和一个页脚,导航栏已经就位,工作正常,但我的页脚已经到处都是了。在一些页面中,它应该是在什么地方,有些则在页面的中间,但在我添加页面内容之前就已经是这样了。 我尝试了一些在网上找到的东西,但到目前为止没有任何效果。 HTML: 页脚HTML: <footer class="footer"> <div class="container"> <div class="row">

我正在制作一个多页面的网站,我在每个页面上都包含一个导航栏和一个页脚,导航栏已经就位,工作正常,但我的页脚已经到处都是了。在一些页面中,它应该是在什么地方,有些则在页面的中间,但在我添加页面内容之前就已经是这样了。 我尝试了一些在网上找到的东西,但到目前为止没有任何效果。 HTML:

页脚HTML:

<footer class="footer">
    <div class="container">
        <div class="row">
            <div class="col-md-3 pull-left">
                <img src="img/Wordmark.png" alt="Logo">
            </div>
            <div class="col-md-5">
                    <a href="links.html">Links</a> |
                    <a href="contact.html">Contact</a> |                    
                    <a href="apps/azindex.pl">A-Z Index</a> |
                    <a href="siteMap.html">Site Map</a> |
                    <a href="disclaimer.html">Disclaimer</a></li>
            </div>
            <div class="col-md-4">
                 <p class="muted pull-right">© 2017 All rights reserved</p>
            </div>
    </div>
    </div>
</footer>

|
|                    
|
|

©2017版权所有


这段代码应该能让你找到正确的方向。我添加了底部:0并将位置更改为固定。我还删除了您的一个未指定的
  • 标记。这将使其位于视图的绝对底部,并始终固定在底部

    html,正文{
    身高:100%;
    宽度:100%;
    }
    正文{
    填充顶部:90px;
    位置:相对位置;
    溢出:滚动;
    }
    .页脚{
    位置:固定;
    底部:0;
    保证金:0;
    宽度:100%;
    背景色:#19D8FF;
    填充:25px;
    边框顶部:4件实心#3399CC;
    最小高度:150px;
    最大高度:250px;
    
    }
    我不认为是这样,但只是提醒一下,您的footer.html文件中有一个随机关闭的
  • 标记。这里:
    。谢谢您的关注!工作得很好!非常感谢!
       html, body {
        height: 100%;
        width: 100%;
    }
    body { 
        padding-top: 90px; 
        position: relative;
        overflow: scroll;
    }
    .footer {
        position: absolute;
        margin: 0;
        width: 100%;
        background-color: #19D8FF;
        padding: 25px;
        border-top: 4px solid #3399CC;
        min-height: 150px;
        max-height: 250px;
    }
    
    <footer class="footer">
        <div class="container">
            <div class="row">
                <div class="col-md-3 pull-left">
                    <img src="img/Wordmark.png" alt="Logo">
                </div>
                <div class="col-md-5">
                        <a href="links.html">Links</a> |
                        <a href="contact.html">Contact</a> |                    
                        <a href="apps/azindex.pl">A-Z Index</a> |
                        <a href="siteMap.html">Site Map</a> |
                        <a href="disclaimer.html">Disclaimer</a></li>
                </div>
                <div class="col-md-4">
                     <p class="muted pull-right">© 2017 All rights reserved</p>
                </div>
        </div>
        </div>
    </footer>