Basic Question on how to remove margins from nested bootstrap containers

Coreysan 1,811 Reputation points
2021-12-10T01:30:40.02+00:00

I'm trying to learn bootstrap grids, and started out with this pseudo-code. I started with 3 columns:

container  
   row  
       col-4  
       col-4  
       col-4  

Well, then I realized I needed to change the layout to this:

container
row
col-8
container
row (I needed to put two columns nested inside col-8)
col-6
col-6
col-4

It works fine. But the inner nested col-6 divs have margins that squish the left and right sides in more.
Is there a way to get the col-6 divs to go back out and press against the col-8 sides, to give it more width?

In other words, all the default left/right margins and/or padding make the nested columns smashed inward a little.

I hope that makes sense!
156428-untitled.png

Developer technologies | ASP.NET | Other
0 comments No comments
{count} votes

Accepted answer
  1. Yijing Sun-MSFT 7,096 Reputation points
    2021-12-10T04:13:02.66+00:00

    Hi @Coreysan ,
    I think,your meaning is moving the padding between col-6 and col-8. Just like this:
    156487-capture12.png

    You need to change the css in the Bootstrap.cs file. Please change "padding:0px". Just like this:

    156521-new-text-document-3.txt

    Maybe your Bootstrap's version is different with my,so I suggest you could press F12 when you run your page and select the Elements to check your css. Just like this:
    156439-capture13.png

    Best regards,
    Yijing Sun


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Coreysan 1,811 Reputation points
    2021-12-10T17:02:05.217+00:00

    Excellent - thank you!!!!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.