douxian1892 2016-09-15 16:44
浏览 273

背景图片不显示内部div

I have a navigation window that has a logo and then different navigation links. I want to have a border in the bottom of the the navigation and I used a background image for this. I do not want it throughout the whole navigation only outside the inner divs.

The first image below it how it currently appears

Current View

and the second is the desired outcome

Desired Vie

The main problem is that some of the bottom borders for the inner divs are gradient with transparent but the bottom border of the parent takes over it and removes the transparent.

Is there any approach where the background does not appear for the inner divs? or have a bottom border for the parent div only show outside the inner divs?

My apologis, here is my current set up

.parentNav {
  background-image: url(blue_line_bottom);
  background-repeat: no-repeat;
  background-size: 100% 7%;
  background-position-y: 82px;
}
.logoImage {
  width: 100%;
  height: 89px;
  right: 0;
  position: relative;
  background-image: url(http://sitelogo_with_transparency);
  background-repeat: no-repeat;
  background-position: -17px 1px;
}
.navLanding {
  padding-top: 4px;
}
.item {
  display: inline-block;
  width: 25%;
  text-align: center;
  border-bottom: 3px solid #006B93;
}
<div class="parentNav">
  <div class="siteLogo">
    <div class="logoImage">
      <a href="/" src="http://sitelogo_with_transparency"></a>
    </div>
  </div>
  <div class="navLanding">
    <div class="item">
      <a href="">First Page</a>
    </div>
    <div class="item">
      <a href="/second">Second Page</a>
    </div>
    <div class="item">
      <a href="/third">Third Page</a>
    </div>
    <div class="item">
      <a href="/fourth">Fourth Page</a>
    </div>
    <div class="item">
      <a href="/fifth">Fifth Page</a>
    </div>
  </div>
</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog