How to center a section with bulma
Asked Answered
S

2

9

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>
Smyrna answered 10/11, 2018 at 22:32 Comment(0)
L
21

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>
Lynnell answered 10/11, 2018 at 22:44 Comment(2)
Thanks, I am still trying to go threw documents, I find myself lost at times , at where I need to look. I tried the "is-centered" but did not help so the "is-half" with it is the key. Thanks for help!Smyrna
this solution solve the problem but make the page not responsive, the column is gonna be beside each other even in small screenBengaline
B
0

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

Bolick answered 7/7, 2021 at 14:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.