Forums

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

Home Forums CSS How can I add a scrollbar to the very right of my page?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #262446
    wost
    Participant

    I have this design right now that I’m pretty happy with: https://codepen.io/wostensen/pen/jarJVB

    Currently, the #main-content area has an overflow-y: scroll that is commented out because it stuck right next to the article-elements, which isn’t what I was aiming for. Ideally, I would like to have the scrollbar to the far-right of the page, like on this. How can I achieve that? My goal is to have the sidebar static, and the #main-content being the only scrollable element on the page.

    Oh, and by the way: how can I center the : ADMIN : element down in the “posts”?

    Thanks in advance!

    #262447
    Shikkediel
    Participant

    have the sidebar static

    Most straight forward thing to do would be to give #navigator a position: fixed. You will also have to adapt its width though.

    have the scrollbar to the far-right of the page

    Then just remove this:

    html {
      overflow-y: hidden;
    }
    
    #262451
    wost
    Participant

    Thanks, it looks just as I wanted now! :D

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