How to center a section with bulma

Viewed 20586

I am using bulma framework , and all the content is to the left, how would I center the content on the page? For example this image is to the left.

<section class="section">
  <div class="container">
    <div class="column">
      <figure>
        <img src="/assets/images/norris-lake.jpg" alt="Melton Hill Lake">
      </figure>
    </div>
  </div>
</section>

2 Answers

Have a look at the Bulma docs for Centering columns

<link href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.css" rel="stylesheet" />
<section class="section">
  <div class="container">
    <div class="columns is-centered">
      <div class="column is-half">
        <figure>
          <img src="https://placeimg.com/640/480/any" alt="Melton Hill Lake">
        </figure>
      </div>
    </div>
  </div>
</section>

I have the <figure> tag only inside the <div class="columns is-centered is-mobile">. And it works for me.

Related