【问题标题】:Bootsrap fixed navbar doesnt have margin bottomBootstrap 固定导航栏没有边距底部
【发布时间】:2020-06-24 06:45:01
【问题描述】:

我用 bootstrap 4 创建了一个简单的主题。导航栏有一个固定的顶级类。在导航下,我有这个 div,它的内容是页面标题。

<div class="aloldal_text_div">
<div class="container">
    <h1><?php get_site_cim($siteID); ?></h1>
</div>

我的问题是,这个 div “上升”到导航栏。我给它一些margin-top,但它不行,我认为是因为固定的导航栏。

有人可以帮我解决这个问题吗? You can see my site on this link.

谢谢。

【问题讨论】:

    标签: html css twitter-bootstrap bootstrap-4 navbar


    【解决方案1】:

    margin-top .aloldal_text_div 你的标题高度

    .aloldal_text_div{
       width: 100%;
       padding: 20px 0;
       background:#d3bf84;
       color:#fff;
       margin: 67px 0 0; /*edit here*/
    }
    

    【讨论】:

    • 谢谢!当我使用固定顶部导航栏时,我应该始终使用边距吗?
    猜你喜欢
    • 2017-12-09
    • 2017-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-04
    • 2018-09-13
    • 1970-01-01
    • 2018-12-12
    相关资源
    最近更新 更多