Is there a way to fix the blinking of a dropdown menu over a .pdf loaded in a <div>?
-
16-10-2019 - |
Question
I have an object inside a <div>
that is displaying a pdf. This is done within a Content Editor Web Part. My drop down navigation menu "blinks" whenever it is over the <div>
. The drop down blinks in Internet Explorer 6 and is hidden behind the <div>
in Chrome. Is there any way to fix this blinking and hiding? (I have tried z-index)
<div style="z-index:-999">
<object data="page.pdf#navpanes=0" type="application/pdf" width="100%" height="900"></object>
</div>
Solution
You need to specify a low z-index inline on the object itself, and make sure your class for your li's has a higher z-index. Object's don't inherit from the parent object in the DOM, so you must specify inline on the object tag.
<object data="page.pdf#navpanes=0" type="application/pdf" width="100%" height="900" style="z-index: 1;"></object>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange