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

Buttons component inside a modal footer #1589

Closed
laginha87 opened this issue Jan 6, 2018 · 5 comments
Closed

Buttons component inside a modal footer #1589

laginha87 opened this issue Jan 6, 2018 · 5 comments

Comments

@laginha87
Copy link

This is about Bulma.

Overview of the problem

This is about the Bulma CSS framework

I'm using Bulma version 0.6.1
My browser is: Chrome

Description

I was trying to have a modal footer with buttons aligned to the right by using the buttons component inside a model-card-foot

Steps to Reproduce

  1. Use this markup:
<div class="modal is-active">
  <div class="modal-background"></div>
  <div class="modal-card">
    <header class="modal-card-head">
      <p class="modal-card-title">Modal title</p>
      <button class="delete" aria-label="close"></button>
    </header>
    <section class="modal-card-body">
      <!-- Content ... -->
    </section>
    <footer class="modal-card-foot">
      <div class='buttons is-right'>
          <button class="button is-success">Save changes</button>
          <button class="button">Cancel</button>
      </div>
    </footer>
  </div>
</div>

Js fiddle with the scenario: http://jsfiddle.net/6o5n3tqy/1/

Expected behavior

screen shot 2018-01-06 at 12 26 37

Actual behavior

screen shot 2018-01-06 at 12 31 31

I got it working by adding the buttons class to the modal-card-foot component like this:
http://jsfiddle.net/6o5n3tqy/2/

Not sure if that's the intended usecase, if so I can make a PR to add it to the docs either in the buttons section or the modal section.

@gaastonsr
Copy link

I would love this!

@stale
Copy link

stale bot commented Jan 31, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@rajasimon
Copy link

Also is there a way to position one button on the left and another one on the right?

@Deliaz
Copy link

Deliaz commented Oct 12, 2019

@rajasimon #516 (comment)

@sshymko
Copy link

sshymko commented Sep 16, 2020

The following worked for me:

<footer className="modal-card-foot buttons is-right">
  <button class="button is-success">Save changes</button>
  <button class="button">Cancel</button>
</footer>

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

No branches or pull requests

6 participants