Note:

This site is no longer used and is in read-only mode. Instead please go to our new Moodle Developer Resource site.

zIndex: Difference between revisions

From MoodleDocs
Damyon Wiese (talk | contribs)
No edit summary
Note about plan not to migrate this page to the new developer resources. See template for more info.
 
Line 1: Line 1:
{{Template:WillNotMigrate}}
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.
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.


[[Category:Javascript]]
[[Category:Javascript]]

Latest revision as of 13:46, 24 June 2022


Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.


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.