using pullRight prop overflows right floated nav | React-Bootstrap/React

若如初见. 提交于 2019-12-06 12:56:18

Probably you don't need this anymore. But for anyone stumbling over this, here is a working solution (it worked for me, as "pullRight" didn't work either for some reason):

<Nav className="ml-auto">

Looking at the documentation and example you seemed to follow, it looks like you omitted the nav wrapper component Navbar.Collapse which is used for a collapsible navbar. Try adding the component like so:

<Navbar collapseOnSelect>
  <Navbar.Header className="mr-auto">
    <Navbar.Brand>
      <LinkContainer to="/">
        <a>User Management via Redis</a>
      </LinkContainer>
    </Navbar.Brand>
    <Navbar.Toggle />
  </Navbar.Header>
  <Navbar.Collapse>
    <Nav pullRight>
      <LinkContainer exact to="/">
        <NavItem>Search</NavItem>
      </LinkContainer>
      <LinkContainer to="/users">
        <NavItem>All Users</NavItem>
      </LinkContainer>
    </Nav>
  <Navbar.Collapse />
</Navbar>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!