Making modal appear above navbar while using Bulma CSS

While Bulma CSS can be an excellent choice for any project, it can have its own limitations. While the usefulness of Bulma might far outweigh its limitation(s), it can still get frustrating.

We discovered this simple solution while using Bulma for building a RETS application for a client. In this particular case we had to use the application from within WordPress. While there are lots of different ways of serving a RETS web application from inside WordPress, the simple yet effective approach we took is a topic of another post.

So coming back to the issue that we faced was this – we wanted to show a modal which has a Terms & Conditions text and wanted modal appear above navbar on just one particular page. As the application was working pretty fine while using vanilla Bulma, we didn’t want to use Bulma variables. The trade-off was obvious but we went the way we did just for one reason that the requirement wouldn’t repeat anywhere else on that website.

The modal was appearing behind the menu that sat on the navbar and when the user tried to click the window close button, more often than not it resulted in a menu option getting clicked.

A small solution that comprised of 2 steps resolved it for us:-

  1. We used a high enough z-index value on the class="modal".
  2. We wrote the value inline.

So, here is that little yet ‘enough’ solution.

<div class="modal" style="z-index:999999;">

We believe this was a better solution as compared to implementing Bulma variable in this particular scenario. We would be happy to hear your take on it.

Leave a Reply

Your email address will not be published. Required fields are marked *

About Us

Luckily friends do ashamed to do suppose. Tried meant mr smile so. Exquisite behaviour as to middleton perfectly. Chicken no wishing waiting am. Say concerns dwelling graceful.

Services

Most Recent Posts

  • All Post
  • Analytics
  • Branding
  • Development
  • Digital
  • E-commerce
  • Google Tag Manager
  • Leadership
  • Management
  • Marketing
  • Social
  • Uncategorized
  • Websites
  • WordPress

Company Info

She wholly fat who window extent either formal. Removing welcomed.

We are committed to our customers’ success. If you are looking to work with someone who cares for the businesses they work with, call us today.

Services

© 2023 Created with thames.ca