# pageNavOverlay always visible

**URL:** <https://pdfjs.community/t/pagenavoverlay-always-visible/3209>\
**Category:** Technical Support\
**Created:** [April 3, 2024, 12:24pm UTC](https://pdfjs.community/t/pagenavoverlay-always-visible/3209 "2024-04-03T12:24:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![retrotech](https://avatars.discourse-cdn.com/v4/letter/r/a9a28c/32.png) [@retrotech](https://pdfjs.community/u/retrotech)\
**Post date:** [April 3, 2024, 12:24pm UTC](https://pdfjs.community/t/pagenavoverlay-always-visible/3209/1 "2024-04-03T12:24:44Z")

</div>

**Which product are you using?**  
PDF.js Express Plus

**PDF.js Express Version**  
Core version: “8.7.4”  
UI version: “8.7.0”

**Detailed description of issue**  
Make the pageNavOverlay (showing at the bottom of the page) static i.e. always visible

---

<div class="post-metadata">

**Author:** ![darian.chen](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@darian.chen](https://pdfjs.community/u/darian.chen)\
**Post date:** [April 3, 2024, 2:39pm UTC](https://pdfjs.community/t/pagenavoverlay-always-visible/3209/2 "2024-04-03T14:39:19Z")

</div>

Hello Retrotech,

You can keep the pageNavOverlay visible by changing the CSS properties.  
Here is a guide on how to customize styles in the viewer: [PDF.js Express Viewer Style Customization (Color & CSS) | Documentation](https://pdfjs.express/documentation/ui-customization/customizing-styles#change-color-theme)

```
WebViewer(
  {
    licenseKey: 'YOUR_LICENSE_KEY',
    path: 'lib',
    css: 'path/to/stylesheet.css'

```

​ },

In the CSS file, you can add the following snippet to ensure the pageNavOverlay doesn’t disappear.

```javascript
.PageNavOverlay {
    opacity: 1!important;
}

```

Best Regards,  
Darian

---

<div class="post-metadata">

**Author:** ![retrotech](https://avatars.discourse-cdn.com/v4/letter/r/a9a28c/32.png) [@retrotech](https://pdfjs.community/u/retrotech)\
**Post date:** [April 17, 2024, 12:05pm UTC](https://pdfjs.community/t/pagenavoverlay-always-visible/3209/3 "2024-04-17T12:05:53Z")

</div>

I couldn’t get it to work with the CSS path. Maybe the reference path was wrong. Instead I used the below

```javascript
const iframeDoc = instance.UI.iframeWindow.document;
const querySelector = iframeDoc.querySelector('[data-element="pageNavOverlay"]');
querySelector.style.opacity = 1
querySelector.style.visibility = 'visible';

```

---

<div class="post-metadata">

**Author:** ![darian.chen](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@darian.chen](https://pdfjs.community/u/darian.chen)\
**Post date:** [April 17, 2024, 1:00pm UTC](https://pdfjs.community/t/pagenavoverlay-always-visible/3209/4 "2024-04-17T13:00:50Z")

</div>

Hi there,

The CSS path reference is likely incorrect. If you are using a React project, I think the file will have to be in the public folder.

If your file is in ‘public/files’ then the constructor should be:

```javascript
css: '/files/custom.css',

```

We recommend using this approach instead of the iframe way.

Best Regards,  
Darian
