I have developed a straightforward chrome extension tool that displays a small text message (a div with z-index 999999) on the webpage that the user is currently viewing. However, I am facing a problem where the div sometimes gets hidden beneath the existing elements of the page and even changes its contents due to the CSS rules already applied to the page.
The main challenge here is to find a way to ensure that my text message always appears on top of all elements regardless of the website being visited, while also maintaining a consistent look that is unaffected by the existing CSS styles.
Would using an iframe solve this issue? Even with an iframe, it still needs to be displayed above all elements, and it seems like z-index doesn't provide a reliable solution in all cases.