[ad_1]
Hey guys I am learning how to build plugins in WP. I am super new to it but I have a lot of trouble with the CSS in the admin dashboard. Since I want to be able to have a modal when clicked on a record and it darkens the background of the modal it works but it does something weird with the navbar where 1 part gets super dark.
How could I approach this issue?
Is there any **documentation** for making modals in the dashboard?
https://preview.redd.it/3gh69eww58yc1.png?width=2940&format=png&auto=webp&s=c0e954dda5ce88479611a69737611da97aee3c4a
[ad_2]
Put a div id=“modal” in the footer and hide it with css.
#modal { display:none }
Then create a button to open the modal.
Then use JavaScript to toggle the display class of the modal when the button is clicked.
Something like…
$(button).click(function() {
$(modal).toggle();
});
Or google “modal window html example” for code samples.
What does the inspector show?
The admin nav has a [z-index](https://developer.mozilla.org/en-US/docs/Web/CSS/z-index) of `9990`. Set your modal’s index to an equal or higher number (`z-index: 9990`).