zIndex

Jump to: navigation, search

The zindex property in CSS determines which page elements overlay all others. Sometimes we want to force an element to be on the very top with javascript. It would be inefficient to scan every node in the DOM to determine the highest z-index in order to make an element with a slightly higher z-index - instead we recommend marking all page elements with a zindex value with the class "moodle-has-zindex". Various javascript modules will search for this class and ensure that the are considered when performing z-index calculations.