Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Container sizing in Bulma.io

I have started to learn Bulma. I want to minimize container's (grey area in the picture) size in x-axis so I can embed elements into.Couldn't find any related content in documents. Here is my source code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" it> 
    <title>Title</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.css">
</head>
<body>
<section class="hero is-medium">

    <div class="hero-body has-background-danger">
        <nav class="navbar has-background-primary">
            <div class="container has-background-grey-light is-fluid ">
           </div>
        </nav>
    </div>
</section>
</body>
</html>

This is the sample view of this code: grey area is the one that I want to minimize

like image 503
Kadir Susuz Avatar asked Jul 29 '18 13:07

Kadir Susuz


People also ask

How do you give the width in Bulma?

If you want to change the maximum width of all containers, you can do so by updating the values of the $container-max-width Sass variable.


1 Answers

You can wrap it in a column class and then adjust its size. (ex. is-half)

<!DOCTYPE html>
<html lang="en">
 <head>
    <meta charset="UTF-8" it> 
    <title>Title</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.css">
</head>
<body>
<section class="hero is-medium">
    <div class="hero-body has-background-danger">
      <div class="columns is-centered">
       <div class="column is-half">
         <nav class="navbar has-background-primary">
            <div class="container has-background-grey-light is-fluid">
            </div>
         </nav>
       </div>
      </div>
    </div>
</section>
</body>
</html>

Result:

enter image description here

like image 151
aldi Avatar answered Oct 25 '22 07:10

aldi