-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Add completely flush containers (with no padding) #18207
Comments
For bootstrap 4. I forgot to put that in the issue title and I can't add labels/change the title now |
I'd also recommend adding a .row-p-0 or similar that creates a grid with 0 padding |
@Skwai If you mean no padding between the columns, there's apparently no interest in that: #15530 (comment) |
That's interesting. On many projects I often use the following: .row-compact {
margin-left: 0;
margin-right: 0;
> [class^="col"] {
padding-left: 0;
padding-right: 0;
}
} |
I'd also recommend it on container for non-grid html usage |
Nuking the padding on the container means nuking the margin on the rows with likely means nuking the padding on the columns. Rather than nuke all those styles, maybe just roll something custom? |
Punting. |
There should be a way to remove container padding (left right) for mobile device. The grid system works great but in certain scenarios there is no left/right padding required on the main container level. I am trying to find a neat hack for this but so far no go. |
|
I think you mean |
sorry - my fault, i am actually on bootstrap 3. This discussion is probably related to v4. (sorry) |
Hah, assumptions abound on my part. I figured this was v4 so I was pointing out what's documented there today and not what's in |
hi |
.pl-0 .pr-0 |
Bootstrap has container and container-fluid classes for content. While container-fluid is full-width, it comes with some padding, which is undesirable in certain scenarios (e.g. sidebars that are not floating).
I recommend a container-flush class (or a different name if you prefer) that mimics fluid, but has 0 padding on all sides.
The text was updated successfully, but these errors were encountered: