Room Divs Side by Side Using Bootstrap

I tried using the row class, but it did not solve the problem. I'm just trying to take two divs and put them next to each other using only bootstrap, not css. (This is the corner case when I cannot add any css) Is there a way to do this?

I basically have this:

 <div class="OuterMostClass row"> <div class="outerClass"> <button class="btn">button1</button> </div> <div class="outerClass2"> <button class="btn">button2</button> </div> </div> 

And I want the two buttons to be next to each other, and due to limitations I cannot add any CSS except bootstrap. Is it possible?

+6
source share
2 answers

In your code example, the parent div with the class container or container-fluid not displayed, and the dimension classes are not in the columns.

Try the following:

 <div class="container"> <div class="OuterMostClass row"> <div class="outerClass col-xs-6"> <button class="btn">button1</button> </div> <div class="outerClass2 col-xs-6"> <button class="btn">button2</button> </div> </div> </div> 
+5
source

The answer is to add a pull-left class to the buttons, but as Matthew points out, adding a container makes it easier to take care of another interval

+1
source

Source: https://habr.com/ru/post/970712/


All Articles