【问题标题】:Footer issue in website网站页脚问题
【发布时间】:2017-05-21 18:06:48
【问题描述】:

你能帮我看看我的网站http://www.noor-azmi.com/element/

页脚中的文本应居中。

HTML

<footer>
         <div class ="container-fluid con-foot">
            <div id="foot1">Element Design Studio Pte Ltd <br><div id="copy"> Copyright 2017</div></div>
            <div id="footer-logo"><img src="image/Small-E-Logo.png"></div>
        </div>
    </footer>

一切都很好,它们都组合在一个 div 类中,我想让 con-foot 集中在页脚中。我试着给它一个margin-left和margin-right auto,但还是不行。

顺便说一下,网站是在 boostrap 中完成的

【问题讨论】:

  • 您阅读过引导文档吗?如何网格和相关的东西?

标签: html css


【解决方案1】:

试试这个。希望对你有帮助,

.con-foot {
position: absolute;
right: 0;
bottom: 0;
left: 0;
padding: 1rem;
text-align: center;
}

【讨论】:

    【解决方案2】:

    查看从以下位置删除float: left; 的网站:

    #foot {
      /* float: left; remove this line */ 
      margin-left: auto;
      margin-right: auto;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-27
      • 2016-10-04
      • 1970-01-01
      • 1970-01-01
      • 2020-04-26
      相关资源
      最近更新 更多