Bootstrap 4 Accepting Offset-md-*, But Not Col-offset-md, Among Other ...
Có thể bạn quan tâm
- Notifications You must be signed in to change notification settings
- Fork 78.9k
- Star 171k
- Code
- Issues 484
- Pull requests 164
- Discussions
- Actions
- Projects 3
- Security
- Insights
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Sign up for GitHubBy 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
Jump to bottom Bootstrap 4 accepting offset-md-*, but not col-offset-md, among other grid system classes #19966 Closed adtserapio opened this issue May 25, 2016 · 15 comments Closed Bootstrap 4 accepting offset-md-*, but not col-offset-md, among other grid system classes #19966 adtserapio opened this issue May 25, 2016 · 15 comments Labels docs v4Comments
Copy linkadtserapio commented May 25, 2016 • edited Loading
When I use the Boootrap 3.3.6 release, col-md-offset-* is working fine. However, in Bootrap 4, it in results failure. Upon checking and checking, the naming conventions are apparently changed, as I checked it in the bootsrap.css file linked to it via maxcdn. It works when I use: offset-md-* as the one I found in the CSS file. In the documentation though, it still says to use col-md-offset. Also, it's not just in offset-md, also occurs in pull, push in the various grid sizes too: I also posted the question on Stack Overflow http://stackoverflow.com/questions/37427245/bootstrap-4-accepting-offset-md-instead-col-offset-md-naming-convention-bug/ |
The text was updated successfully, but these errors were encountered: |
- 👍 3 reactions
SharkyKZ commented May 25, 2016 • edited Loading
This is intentional. Whatever documentation you're reading is outdated. See here https://github.com/twbs/bootstrap/blob/v4-dev/docs/examples/grid/index.html#L156 https://github.com/twbs/bootstrap/blob/v4-dev/docs/layout/grid.md |
- 👍 3 reactions
- 👎 5 reactions
Sorry, something went wrong.
Copy link Authoradtserapio commented May 25, 2016
Thank you. However, this was taken from http://v4-alpha.getbootstrap.com/layout/grid/ as of the moment of writing. Well sir, I guess the docs must be updated. :) |
- 👍 5 reactions
Sorry, something went wrong.
Copy link Contributorhebbet commented May 25, 2016
with the next alpha, they will update the docs. |
- 👍 1 reaction
Sorry, something went wrong.
Copy link Authoradtserapio commented May 25, 2016
Thanks for the reassurance 👍 |
Sorry, something went wrong.
cvrebert added docs v4 labels May 25, 2016 cvrebert closed this as completed May 25, 2016 Copy linkmohdsafeernk commented Jul 24, 2017
In bootsratp version 4 col-xs/sm/md/lg-offset-* wont work. Please use simply offset-* ex: offset-2 |
- 👍 12 reactions
- 🎉 2 reactions
- ❤️ 3 reactions
Sorry, something went wrong.
Copy linkfrontenddevTS commented Aug 29, 2017 • edited Loading
Bootstrap-4 removed "col-offset-*", for more details see Bootstrap-4 document -> "Offsetting columns"! |
- 👍 1 reaction
Sorry, something went wrong.
Copy linkhelvecio commented Aug 29, 2017
It took me a while to understand how to use the new offsetting system in B4. The documentation lacks enough information as I am not acquainted with Flexbox. It turns out to be simple though. I'm used to creating layouts with 10 columns, thus I'm used to offsetting by one the first column. This is how it is done in B4: Note that ml-md-auto (ml stands for margin left) now is needed to offset the left column by one. And mr-md-auto (mr stands for margin right) is required to offset column 2 to the left by one. Now, start playing with it! |
- 👍 15 reactions
Sorry, something went wrong.
Copy linkkkj930 commented Sep 2, 2017 • edited Loading
Hmm @helvecio , I agree the documentation lacks a bit of extra explanation. I also use a 10 column layout, but used justify-content-center on the wrapping row, like this: <div class="row justify-content-center"> <div class="col-8">.col-8</div> <div class="col-2">.col-2</div> </div>No need to use the margin classes in such case then. I'm not sure what the advantages/drawbacks are for one over the other. I guess if you want different behaviour for different screen sizes, you might have to play around with the specific cols + margins. |
Sorry, something went wrong.
Copy linkhelvecio commented Sep 2, 2017
@kkj930 I usually want my columns to stack when the layout is displayed in a smaller screen. With your solution, it remains side by side. |
Sorry, something went wrong.
Copy linkwadmoy commented Apr 2, 2018
The col-push-* and col-pull-* classes are included in the Bootstrap4 Extension: http://bootstrap-extension.com/ |
Sorry, something went wrong.
Copy linkxeroxism commented Jun 27, 2018
offset-* works well in B4 |
Sorry, something went wrong.
Copy linkcre8ivetech commented Jul 15, 2018 • edited Loading
In Bootstrap3: To offset columns: col-*-offset-* Example, col-sm-offset-4. In Bootstrap4: To offset columns: offset-*-* Example, offset-sm-0 |
- 👍 5 reactions
Sorry, something went wrong.
Copy linkphazei commented Oct 31, 2018 • edited Loading
offset-*-* works, but it doesn't override the m*-* classes. For example: <div class="col-8 mx-sm-auto col-sm-4 offset-md-3 col-md-5"> That doesn't actually offset-md-3 at md because the m*-* is !important. |
Sorry, something went wrong.
Copy linkjackdhamu commented Apr 17, 2019
anybody can explain offset concept |
- 👍 1 reaction
Sorry, something went wrong.
Copy linkhelvecio commented Apr 23, 2019
Offsetting columns is a way to be more creative and positioning your content areas. Remember Bootstrap uses a 12-column grid. Say you want a centered 6-column layout (C). If you create a col-4 you get: C C C C C C X X X X X X To center your 6 columns, add a 4-column offset (A). A A A A C C C C X X X X |
Sorry, something went wrong.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Assignees No one assigned Labels docs v4 Projects None yet Milestone No milestone DevelopmentNo branches or pull requests
13 participants You can’t perform that action at this time.Từ khóa » Html Col-md-offset-4
-
Grid System - Bootstrap
-
CSS · Bootstrap
-
Bootstrap Grid Examples - W3Schools
-
Offset Columns In Bootstrap - Stack Overflow
-
Bootstrap Offset Property - CSS3 Menu
-
Col-md-offset In Bootstrap 4 Code Example
-
Offset Columns In Bootstrap - Tutorialspoint
-
[Solved]: Bootstrap Col-md-offset-* Not Working
-
Bootstrap Offset Right Side - Code Helper
-
Bootstrap Offset - Website Design Software
-
Grid System - ACS Design System - American Chemical Society
-
Alternative To Offset In Bootstrap 4 - CodePen
-
Offsetting Columns Is Not Working · Issue #23360 · Twbs/bootstrap
-
What Are Offsetting Columns In Bootstrap 3 Grid System