Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #12951
Closed
Open
Issue created Mar 07, 2014 by Administrator@rootContributor

Document broken "outdent" with multiple navbar-right classes

Created by: fleaflicker

First reported in #12947 . Resubmitting with an example and more details as requested by @mdo .

http://jsfiddle.net/D2RLR/5339/ (this is a pure CSS issue, but you'll need to expand your viewport so that the navbar is not collapsed)

The example shows the navbar from the docs but with one change -- the form is pulled right with .navbar-right.

I believe the intent of all the negative margins on .navbar-right is so that the right-most one will go up to the right edge of the navbar.

It works with just one .navbar-right element, but not with two or more because right floated elements appear in reverse order from their markup order.

In the example, the `.nav' items are shifted right 15px. They should not be but the form should be shifted right 15px.

Relevant excerpt from navbar.less

// Outdent the form if last child to line up with content down the page
&.navbar-right:last-child {
      margin-right: -@navbar-padding-horizontal;
    }

The negative margin should apply to the first element with the .navbar-right class. But I'm not sure how to select that.

Assignee
Assign to
Time tracking