The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Scrollable fixed div, but hide scrollbars?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #210109

    Hi folks,

    I have a full-screen modal window that opens when a user clicks a button that brings them to a contact form. To get the modal window to behave correctly, the modal div is position: fixed. It works great for the menu modal, but for the contact form modal it breaks down because the form is longer than the screen.

    I found a nifty fix on StackOverflow that suggested adding overflow-y: auto to the main modal div and creating a new .inner class for an inner div.

    That was a good solution to allow the user to scroll, but now there are two scrollbars. I feel like I’m asking for the moon, but is there a way to have overflow-y: auto without having a second scrollbar attached to that div?

    Thanks in advance!


    It looked promising, but didn’t fix it :(

    All of these different examples I’ve found on StackOverflow don’t have the parent div set with position: fixed, I wonder if that’s my problem. Sad thing is that’s what makes my modal work!

    I’ll have to ponder this longer.

    Thanks for the link.


    Not sure I get the exact circumstance but it kinda sounds possible with JS by creating your own scroll :

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.