Hide the scrollbar in webkit

by

Web tricks

Today I decided to improve the looks of Grooveshark, as I run it in a Chrome app window, and I wanted it to sort of melt into the rest of the window decorations. I thought maybe removing the scrollbar from the left sidebar would look good, but how? overflow:hidden hides the scrollbar, but also disables scrolling.

Luckily we have Google, and I found out you can style scrollbars in Chrome with

#element::-webkit-scrollbar { /* css here */ }

So the solution was fairly simple:

#element::-webkit-scrollbar { width: 0 !important }

Scrolling still works, and it looks much better. That said, be careful if using this for others to see. It’s likely that you’ll confuse your visitors when they see no scrollbars!

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: