erichexter / twitter.bootstrap.mvc

nuget package to make bootstrap easy with mvc4
Apache License 2.0
248 stars 134 forks source link

Fixed nav in basic and narrow layouts #49

Closed chrisfraser closed 11 years ago

chrisfraser commented 11 years ago

Hi Eric. You are on to a good thing here. This has saved me a few hours. Thank you for your work on this. I have fixed up some little issues.

In the basic layout the nav-collapse div needed an extra collapse class to allow the dropdown items to be visible in the collapsed state.

Basic Collapsed Nav bug

In the narrow layout the y-overflow on .masthead .nav stopped the dropdown from displaying.

Narrow Nav Bug

chrisfraser commented 11 years ago

Added functionality to ControlGroupExtensions so that the @using syntax may be used for the extension. This negates the usage of the EndControlGroupFor helper. Also refactored a bit and includes htmlAttributes

@using(Html.ControlGroupFor(property.Name, new {@class="makeMePretty"})){
    // Your ControlGroup here 
}

is now an alternative to:

@Html.BeginControlGroupFor(property.Name)
// Your ControlGroup here
@Html.EndControlGroup() // Forgetting me leads to tears