Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulma - flexbox: Create specific behavior #3645

Open
hajerty opened this issue May 3, 2023 · 1 comment
Open

Bulma - flexbox: Create specific behavior #3645

hajerty opened this issue May 3, 2023 · 1 comment

Comments

@hajerty
Copy link

hajerty commented May 3, 2023

This is about **Bulma **.

I need help

Overview of the problem

I would create this behavior with Bulma.

Description

I need to respect same width and for each width I have to visualize the box in 1, 2 or 3 columns. When first column go to new line I need that the first is the second column and not the third.

Steps to Reproduce

Expected behavior

Actual behavior

@OmprakashR
Copy link

OmprakashR commented Aug 18, 2023

Hi @hajerty ,

Please find the below code for your respective output behavior.

Steps 👍

  1. Add .columns & .is-multiline to the parent div
  2. Add .columns to the child's div with .is-6 for the same width.
  3. use .is-multiline for the wrap of the 3 divs so 1 and 2 are on the same line and the 3rd comes to the next line.

Code

  <div class="columns is-gap-4 is-multiline  ">
        <div class="column is-6 "> 
            <div class="has-background-success has-text-centered has-text-white p-4">
                1
            </div>
        </div>
        <div class="column is-6"> 
            <div class="has-background-success is-p-2 has-text-centered text-white has-text-white p-4">
              2
            </div>
        </div>
        <div class="column is-6"> 
            <div class="has-background-success is-p-2 has-text-centered text-white has-text-white p-4">
               3
            </div>
        </div>
      </div>

Custume CSS for the padding ;

  .p-4{
       padding: 4em;
   }

Demo: Codepen Solution link

I hope this will help you.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants