Ah, hidden scrollbars; So popular, yet so annoyingly difficult to make work (and such bad user interface!). I understand the appeal —who wants big bulky scrollbars in the way, anyway?— but the existing code that most people use to create them has left profile makers with more problems than solutions, and not to mention a fair deal of confusion along the way.
Warning!
As much as you may love the idea of hiding your big ugly scrollbar to get it out of the way of your profile, in reality, hiding your scrollbars isn't really as great an idea as it seems. It looks nice, sure, but it can also cause problems for some of the viewers of your profile. Maybe you take it for granted, but not everyone has a mouse or trackpad that can scroll without clicking on a scrollbar and moving it. Removing the option of an accessible scrollbar may leave them unable to scroll your content without just resorting to using the arrow keys, which is quite annoying, especially if your profile has a lot of content on it. Try it out, you'll probably see what I mean.
If you want to have some sympathy for the people who are stuck clicking and dragging scrollbars, I suggest you skip the rest of this section and go back to the previous post for instructions on how to get a normal scrollbar; However, if you decide to disregard those people and hide your scrollbar anyway, you may continue reading.
How do hidden scrollbars work?
Creating hidden scrollbars is a technique that is fairly basic conceptually, but can be quite confusing and difficult for people unfamiliar with the way CSS and HTML work. To help explain them in a way that may make it less confusing for the inexperienced, I have created a handy gif of the key part of making hidden scrollbars work:
To explain in writing what that image means, a hidden scrollbar is made up of an inner element and an outer element, and uses padding and the overflow property to create and hide the scrollbar. The scrollbar isn't actually invisible, it is still there on the inner element, but the padding that you add actually just pushes the scrollbar outside of the outer element so you can't see it anymore. The outer element has its overflow set to
hidden, so everything beyond the outside of the outer element will be invisible, including the scrollbar after it's been pushed out.
How to create a hidden scrollbar
The existing code options for creating a hidden scrollbar have all been fairly lengthy and confusing, and have required the user to input multiple values and ended up requiring much trial-and-error testing just to get everything working correctly. I have simplified the code so that the only thing
you need to specify is the height of the inner element of the panel.
The code:
outer element selector {
overflow: hidden;
}
inner element selector {
overflow-y: scroll;
padding-right: 50px;
height: ##px;
width: 100%;
}
Everything in this code reflects the image demonstration above of how hidden scrollbars work.
Outer element selector means the selector for the element on the outside that hides the scrollbar.
Inner element selector means the selector for the element on the inside with the actual scrollbar on it.
In order for the scrollbar to work, all you have to do is substitute in the correct selectors, as I will list below, for the inner an outer element, and you have to give the panel a height in order for the scrollbar to show up. The selector for the inner element replaces
inner element selector, the selector for the outer element replaces
outer element selector, and the height of the panel replaces
##px. Edit in the proper values and put the result into your custom CSS, and it should work.
The selectors
Not all panels come with a built-in inner and outer element or the functionality to create one yourself. Only the panels that have both an inner and outer element work with hidden scrollbars. Without both elements present, the hidden scrollbar simply cannot be made. The following are the selectors for the panels that allow hidden scrollbars:
Current Profiles:
Outer element selector: #id_friends
Inner element selector: #id_friends .style1
Outer element selector: #id_comments
Inner element selector: #id_comments dl
Outer element selector: #id_badges
Inner element selector: #badges
Outer element selector: #id_journal
Inner element selector: #entries
Outer element selector: #id_gifts
Inner element selector: #id_gifts ul
Outer element selector: #id_store
Inner element selector: #id_store div
Outer element selector: #id_guilds
Inner element selector: #id_guilds ul
Outer element selector: #id_custom_####
Inner element selector: #id_custom_####_content
Classic Profiles:
Outer element selector: #friends
Inner element selector: #friendGroup
Outer element selector: #comments
Inner element selector: #comments dl
Outer element selector: #journal
Inner element selector: #entries
Outer element selector: #profile
Inner element selector: #equipped_id
Outer element selector: #wishlist
Inner element selector: #wishlist .items
Hidden scrollbars on the About panel
All of the aforementioned elements come with the convenience of built-in inner and outer elements, but not all elements are so lucky. The one element that still possesses the capability of making a hidden scrollbar but doesn't come with an inner element already made is the About panel. In order to make a working hidden scrollbar on your About panel, you have to create an inner element yourself using BBCode.
The way this works relies on the fact that BBCode generates HTML elements that affect your text, and so enclosing the full text of your About Me within a BBCode tag would generate an inner element that you can use to create a scrollbar. The most common element is the BBCode list tag, because it doesn't add any styling to your text (as would tags like b and align), and it's not very often used so the CSS affecting it is less likely to accidentally affect the styling of your text.
The code:
The code for this is simple, and by using it, it will generate a ol element that you can use as an inner element:
[list=1]About Me Text[/list]
Be sure to put all of your desired text within the list tags, and then put this into your About Me and save.
The selectors:
Once you've modified your About Me to create the inner element, you can use the following selectors as the inner and outer elements for your hidden scrollbar:
Outer element selector: #id_about
Inner element selector: #id_about ol
Outer element selector: #about
Inner element selector: #about ol