Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #4182
Closed
Open
Issue created Jul 25, 2012 by Administrator@rootContributor

Stacking Modals

Created by: boroth

I saw someone put an issue up about 4 months ago about stacking modals not having the backdrops at the right z-indexes (you could see lower modals still), and couldn't figure out if he actually got his pull request in or not.

Anywho, I came up with a somewhat simple CSS solution to this problem using adjacent selectors.

I added a "level2" class to my modal with this css .modal.level2 { z-index:1052 }

And then this for the stacking: .modal-backdrop.in + .modal-backdrop.in { z-index: 1051; }

This isn't the most elegant solution, and it must be defined further if you want more than 2 modals open at a single time. Will work on a way to maybe have classes that specify different z-index "levels" for modals to sit in, so you can have certain modals always appear over others (or a system with which the most recently opened modal-backdrop is always put on top of the preceding modals.

Assignee
Assign to
Time tracking