Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha version 6. .container inside .navbar on extra small screens (.xs) does not render 100% width using .col-12 #22694

Closed
classicmike opened this issue May 25, 2017 · 1 comment
Labels

Comments

@classicmike
Copy link

classicmike commented May 25, 2017

Currently on Alpha version 6, you wish to set your nav items in the navbar constrained within your container div, similar to what is currently on the Bootstrap 4 site. I would find this a common use case scenario.

Despite you setting a wanting to set a full width column on extra small screens ('xs') using the grid's .col-12 class, when viewing the page in xs breakpoint screen size, it seems like the widths are never ever 100% width and the size of the column would depend on the width of the content and it is 'centered'.

E.g. html below which would trigger this issue:

<div class="navbar bg-primary">
    <div class="container">
        <div class="row">
           <div class="col-12">
               <p>Hello World</p>
           </div>
        </div>
    </div>
</div>

Under Bootstrap 3 with the above code, the behaviour would render the column the correct 100% width and text would start from the left of the page.

You can see the results of the test here. This also shows a comparison with a similar markup structure without the '.navbar' div:
https://jsbin.com/fetikulimu/edit?html,output

I have a feeling it would be due to the flexbox configuration set to display as flex and the .container div not explicitly stating that it should be 100% width on xs screens.

Unless if there was an intention to do things this way, I think the way to fix this, is that if you set the .container width to 100% by default you can avoid any future issues where you wrap the .container with a flex-boxed div.

Other issue information as follows:

  • Operating system and version: MacOS ver. 10.12.3
  • Browser and version: Chrome ver. 58.0.3029.110

Only tested on the above but I'm pretty sure it will happen on other devices/browsers as well.

Cheers.

@mdo
Copy link
Member

mdo commented May 26, 2017

Dupe many times over. See #21590.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants