Paul
Paul

Reputation: 11756

why can't I see the box-shadow for twitter bootstrap navbar?

In version 2.0.4 of Twitter Bootstrap I added a box shadow to my nav-bar and it worked great. (see the image below)

enter image description here

I recently upgraded to version 2.2.1 and tried doing the same but I fail to see the box shadow below my navbar. Here is my current style:

.navbar {
overflow: visible;
margin-bottom: 18px;
color: #fff;
*position: relative;
*z-index: 2;
}

.navbar-inner {

min-height: 40px;
padding-left: 20px;
padding-right: 20px;
background-color: #fafafa;

background-color: #fafafa;
background-image: -moz-linear-gradient(top, #4e8ece, #356aa0);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e8ece), to(#356aa0));
background-image: -webkit-linear-gradient(top, #4e8ece, #356aa0);
background-image: -o-linear-gradient(top, #4e8ece, #356aa0);
background-image: linear-gradient(to bottom, #4e8ece, #356aa0);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#333333', endColorstr='#222222',GradientType=0 );

-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;

-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.065);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.065);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.065);
*zoom: 1;

}

Any ideas why the drop shadow isn't appearing in 2.2.1?

Upvotes: 2

Views: 3011

Answers (1)

Praveen Kumar Purushothaman
Praveen Kumar Purushothaman

Reputation: 167240

In the bug reported, the possible solution would be:

.box-shadow(@shadow1, @shadow2) {
  -webkit-box-shadow: @shadow1, @shadow2;
     -moz-box-shadow: @shadow1, @shadow2;
          box-shadow: @shadow1, @shadow2;
}
.box-shadow(@shadow1, @shadow2, @shadow3) {
  -webkit-box-shadow: @shadow1, @shadow2, @shadow3;
     -moz-box-shadow: @shadow1, @shadow2, @shadow3;
          box-shadow: @shadow1, @shadow2, @shadow3;
}

And the latest version 2.1.2-WIP has this code:

// Drop shadows
.box-shadow(@shadow) {
  -webkit-box-shadow: @shadow;
     -moz-box-shadow: @shadow;
          box-shadow: @shadow;
}

Upvotes: 1

Related Questions