Css 容器与标题重叠

Css 容器与标题重叠,css,Css,我的容器有问题,它实际上与标题重叠,我如何在css中调整它?它应该在标题下,标题和容器之间有一点空白 看到这里的截图了吗 #myHeader{ 位置:固定; 排名:0; 左:0; 宽度:100%; z指数:100; 背景颜色:黄色; 盒影:0px 2px 3px#8888888; 高度:150像素; 不透明度:0.95; 过滤器:α(不透明度=10); } #霉菌含量{ 填充顶部:10px; } #麦肯特街{ 背景色:#fff; } #霉菌素h1{ 边际上限:0; } 使命与愿景

我的容器有问题,它实际上与标题重叠,我如何在css中调整它?它应该在标题下,标题和容器之间有一点空白

看到这里的截图了吗

#myHeader{
位置:固定;
排名:0;
左:0;
宽度:100%;
z指数:100;
背景颜色:黄色;
盒影:0px 2px 3px#8888888;
高度:150像素;
不透明度:0.95;
过滤器:α(不透明度=10);
}
#霉菌含量{
填充顶部:10px;
}
#麦肯特街{
背景色:#fff;
}
#霉菌素h1{
边际上限:0;
}    

    使命与愿景
    我们公司几年前开始贸易,但从一开始我们只做专业项目。 我们对好的结果并不满意。它需要完美。

    这就是为什么我们仍然教育我们的雇主让他们成为这个地区最好的。 我们每两年向雇主提供一次新技术测试,以确保我们在市场上处于领先地位。

    失败是没有借口的。我们的标准是如此之高,以至于对我们来说,每一次都是质量第一准则。

    你可以在照片库中看到我们的参考资料,但它们更多。我们公司与QINT、TSN-D或FinishLine等合作伙伴保持联系。。。

    来我们公司找潜在客户,看看我们的投资组合是否符合您的愿景,然后我们可以找到最好的方法 如何共同实现它!


    标题应位于容器内,并为容器提供固定宽度

    以下是一个例子:

    .container{宽度:100%;最大宽度:500px;边距:0自动;位置:相对;背景色:黄色;填充顶部:100px;}
    .标题{宽度:100%;最大宽度:500px;左边距:-250px;左边距:50%;高度:100px;背景色:红色;位置:固定;顶部:0px;文本对齐:中心;}
    
    标题
    这是您的容器
    这是您的容器
    这是您的容器
    这是您的容器
    这是您的容器
    这是您的容器

    我在这里遇到了同样的问题,显然,我用以下解决方案解决了这个问题:

    style=“z-index:1”表示导航栏或标题; 对于容器,style=“z-index:0”


    *提醒:在html脚本中使用“样式”而不是链接到它的css文件夹是不推荐的,但最好是避免这种情况。

    请共享html和css代码。默认情况下,mst时间不会重叠,因此您可能在某个地方犯了错误,而这实际上是在强迫这种情况发生。如果看不到任何代码,很难说更多。请用小提琴再现这种行为
        #myHeader {
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          z-index: 100;
          background-color: YELLOW; 
          box-shadow: 0px 2px 3px  #888888;
          height: 150px;  
          opacity:0.95;
          filter:alpha(opacity=10);  
        }
    
    #myContent {
        padding-top: 10px;
    
    }
    
    #myContent .row {
        background-color: #fff;
    }
    
    #myContent h1{
      margin-top: 0;
    
    }    
    
    
        <section id="myContent">
            <div class="container">
                <div class="row">
                    <div class="col-sm-8 col-md-8 col-lg-8">
                        <div>
                            <br />
                            <?php if ($breadcrumb): ?>
                              <div id="breadcrumb"><?php print $breadcrumb; ?></div>
                            <?php endif; ?>
    
                            <?php print $messages; ?>
    
                            <div id="content" class="column"><div class="section">
                              <a id="main-content"></a>
                              <?php print render($title_prefix); ?>
                              <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
                              <?php print render($title_suffix); ?>
                              <?php if ($tabs): ?><div class="tabs"><?php print render($tabs); ?></div><?php endif; ?>
                              <?php print render($page['help']); ?>
                              <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
                              <?php print render($page['content']); ?>
                              <?php print $feed_icons; ?>
                            </div></div> <!-- /.section, /#content -->
    
                            <?php if($is_front):?>
                            <h2>MISSION & VISION<br /></h2>
                            <!-- <img src="<?php print(path_to_theme()); ?>/images/Bottom.jpg" alt="" class="img-thumbnail pull-left" style="margin-right: 10px;" /> -->
                            <div>
                                Our company comes to trade few years ago but from beginning we start to do only professional projects.
                                We our not satisfied with just good result. It needs to be perfect.
                                <br /><br />
                                That's why we teach our employers still to make them the best in this region.
                                Every 2 years we give to our employers test from new technologies to make sure that we are leaders on market.
                                <br /><br />
                                There is no excuse for fails. Our standards are so high that for us is every time the first rule quality.
                                <br /><br />
                                You can see in photogallery our references but they are more. Our company are in touch with partners like QINT, TSN-D or FinishLine...
                                <br /><br />
                                Come to our company take prospects to see if our portfolio fit to your vision and after that we can find the best way
                                how to realize it TOGETHER!
                                <br /><br />
                            </div>
                            <?php endif; ?>
                        </div>
                    </div>