Skip to content

Commit

Permalink
Add default navbar z-index to fix twbs#9844
Browse files Browse the repository at this point in the history
iOS doesn't pick up the z-indexing properly on the dropdowns unless you
specify one for the parent navbar.
  • Loading branch information
mdo committed Aug 19, 2013
1 parent b569836 commit 7bc845a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -4013,6 +4013,7 @@ textarea.input-group-sm > .input-group-btn > .btn {

.navbar {
position: relative;
z-index: 1000;
min-height: 50px;
margin-bottom: 20px;
border: 1px solid transparent;
Expand Down Expand Up @@ -4159,7 +4160,6 @@ textarea.input-group-sm > .input-group-btn > .btn {
position: fixed;
right: 0;
left: 0;
z-index: 1030;
border-width: 0 0 1px;
}

Expand All @@ -4172,6 +4172,7 @@ textarea.input-group-sm > .input-group-btn > .btn {

.navbar-fixed-top {
top: 0;
z-index: 1030;
}

.navbar-fixed-bottom {
Expand Down
2 changes: 1 addition & 1 deletion dist/css/bootstrap.min.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion less/navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

.navbar {
position: relative;
z-index: @zindex-navbar;
min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
margin-bottom: @navbar-margin-bottom;
border: 1px solid transparent;
Expand Down Expand Up @@ -127,7 +128,6 @@
position: fixed;
right: 0;
left: 0;
z-index: @zindex-navbar-fixed;
border-width: 0 0 1px;

// Undo the rounded corners
Expand All @@ -136,6 +136,7 @@
}
}
.navbar-fixed-top {
z-index: @zindex-navbar-fixed;
top: 0;
}
.navbar-fixed-bottom {
Expand Down
1 change: 1 addition & 0 deletions less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
// Used for a bird's eye view of components dependent on the z-axis
// Try to avoid customizing these :)

@zindex-navbar: 1000;
@zindex-dropdown: 1000;
@zindex-popover: 1010;
@zindex-tooltip: 1030;
Expand Down

0 comments on commit 7bc845a

Please sign in to comment.