It&#x27;s done via the &#x27;z-index&#x27; CSS property [0]. Essentially, the higher the z-index, the higher the priority of the element; a higher z-index will appear in front of a lower z-index.<p>[0]: <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;z-index" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;z-index</a>