Search code examples
csssassbulma

How can I make 2 centered divs with left aligned text?


I'm using Bulma + SCSS, and I'm trying to make 2 centered columns (like mx-auto) with a bit of padding in between (p-3, for example). How can I do this? (sorry for not having any code to show)

Example


Solution

  • I hope this is what you asked for

    <section style="width: 100%; display:flex; justify-content: center;" >
     <section style="display:flex; gap: 0 100px;">
      <div>
       Box 1
      </div>
      <div>
       Box 2
      </div>
     </section>
    </section>
    

    the gap property doesn't work on safari and some other browsers so you can use margin or padding to seprate the divs