Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

Using bootstrap to center 1 div and place another one next to it [duplicate]

$
0
0

I'm trying to use Bootstrap's d-flex in a slightly different way than in this example:

enter image description here

My aim is to have the "Content" box and the "Justify" box being shown, but not the "Center" box without changing the layout. With other words, the "Content" should be in the center and "Justify" just next to it.

If I just remove "Center", "Justify" and "Content" are centered at the divider between them (which is expected). Unfortunately, I don't know the widths of any of the boxes, so I can't just create a dummy "Center" container with the same width as "Justify" to keep "Content" centered.

Is there a flex control which allows "Content" to always be centered, irrespective of the other boxes?


Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>