Solved

style a scroll bar

Posted on 2014-11-10
5
222 Views
Last Modified: 2014-11-12
I'm trying to style a scroll bar in a DIV (or any other container) using the css I found here:

http://farrukhobaid.wordpress.com/2013/01/16/dark-scrollbar-skin-for-javafx/

as a test, I put the css in a style tag in a blank html file and used the following code to see what would happen:

<div class="scroll-bar" style="height: 300px; width: 100px; overflow: scroll;">
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
    kjhgfgft<br /><br />
</div>

Open in new window


no matter what I do, I don't get any style. am I missing something or is this code no good?
0
Comment
Question by:Big Monty
  • 2
  • 2
5 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
Comment Utility
What browsers are you testing with?
0
 
LVL 32

Author Comment

by:Big Monty
Comment Utility
chrome and IE9 (shudder)
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
Comment Utility
Okay, the code's no good because it's aimed at a totally different product (some Oracle thing called JavaFX) that may have some integrated browser with a very predictable environment.

I'm pretty sure most of the browsers have removed the pure-CSS solutions or at least have deprecated them.  You should probably do this with JQuery or webkit-specific code instead:

http://www.hongkiat.com/blog/css-scroll-bar/
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
That code is for https://docs.oracle.com/javafx/2/overview/jfxpub-overview.htm

Try removing all of the -fx-
0
 
LVL 32

Author Closing Comment

by:Big Monty
Comment Utility
ya that's what I presumed, just wanted to double check. I'll look into a jquery or bootstrap solution (if it exists) and go that route.

I tried removing the -fx- from the css and it still didn't work. Thx anyways
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to count occurrences of each item in an array.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now