0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

navbar and dropdown fixes, for alignments and for ie7/8 dropdown hidden bugs from #3946

This commit is contained in:
Mark Otto 2012-08-14 16:24:58 -07:00
parent f3479a3953
commit 9c72246d49
6 changed files with 32 additions and 17 deletions

View File

@ -34,7 +34,7 @@
.input-block-level {
display: block;
width: 100%;
min-height: 28px;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
@ -203,7 +203,7 @@
display: block;
float: left;
width: 100%;
min-height: 28px;
min-height: 30px;
margin-left: 2.564102564102564%;
*margin-left: 2.5109110747408616%;
-webkit-box-sizing: border-box;
@ -548,7 +548,7 @@
display: block;
float: left;
width: 100%;
min-height: 28px;
min-height: 30px;
margin-left: 2.7624309392265194%;
*margin-left: 2.709239449864817%;
-webkit-box-sizing: border-box;
@ -830,7 +830,7 @@
.uneditable-input {
display: block;
width: 100%;
min-height: 28px;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;

View File

@ -150,7 +150,7 @@ textarea {
.input-block-level {
display: block;
width: 100%;
min-height: 28px;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
@ -340,7 +340,7 @@ a:hover {
display: block;
float: left;
width: 100%;
min-height: 28px;
min-height: 30px;
margin-left: 2.127659574468085%;
*margin-left: 2.074468085106383%;
-webkit-box-sizing: border-box;
@ -2865,6 +2865,7 @@ table .span24 {
position: relative;
height: 0;
overflow: hidden;
overflow: visible \9;
-webkit-transition: height 0.35s ease;
-moz-transition: height 0.35s ease;
-o-transition: height 0.35s ease;
@ -4344,26 +4345,26 @@ input[type="submit"].btn.btn-mini {
border-bottom-color: #555555;
}
.navbar .pull-right .dropdown-menu,
.navbar .dropdown-menu.pull-right {
.navbar .pull-right > li > .dropdown-menu,
.navbar .nav > li > .dropdown-menu.pull-right {
right: 0;
left: auto;
}
.navbar .pull-right .dropdown-menu:before,
.navbar .dropdown-menu.pull-right:before {
.navbar .pull-right > li > .dropdown-menu:before,
.navbar .nav > li > .dropdown-menu.pull-right:before {
right: 12px;
left: auto;
}
.navbar .pull-right .dropdown-menu:after,
.navbar .dropdown-menu.pull-right:after {
.navbar .pull-right > li > .dropdown-menu:after,
.navbar .nav > li > .dropdown-menu.pull-right:after {
right: 13px;
left: auto;
}
.navbar .pull-right .dropdown-menu .dropdown-menu,
.navbar .dropdown-menu.pull-right .dropdown-menu {
.navbar .pull-right > li > .dropdown-menu .dropdown-menu,
.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {
right: 100%;
left: auto;
margin-right: -1px;

View File

@ -46,6 +46,18 @@
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li class="nav-header">Nav header</li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form pull-right">
<input class="span2" type="text" placeholder="Email">

View File

@ -15,6 +15,7 @@
position: relative;
height: 0;
overflow: hidden;
overflow: visible \9;
.transition(height .35s ease);
&.in {
height: auto;

View File

@ -154,11 +154,12 @@
.input-block-level {
display: block;
width: 100%;
min-height: 28px; // Make inputs at least the height of their button counterpart
min-height: 30px; // Make inputs at least the height of their button counterpart
.box-sizing(border-box); // Makes inputs behave like true block-level elements
}
// Mixin for form field states
.formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
// Set the text color

View File

@ -327,8 +327,8 @@
}
// Right aligned menus need alt position
.navbar .pull-right .dropdown-menu,
.navbar .dropdown-menu.pull-right {
.navbar .pull-right > li > .dropdown-menu,
.navbar .nav > li > .dropdown-menu.pull-right {
left: auto;
right: 0;
&:before {