Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
163
rated 0 times [  167] [ 4]  / answers: 1 / hits: 20975  / 14 Years ago, tue, august 24, 2010, 12:00:00

How do I go about changing the css of an iframe scrollbar?



My problem with the current scrollbar in my iframe is the frame is not very wide and the scrollbar appears bulky in it and takes up too much space.



Using scrolling=no makes the scrollbar disappear but then the user cannot scroll.



By the way, My browser is Google Chrome.


More From » html

 Answers
8

This is the css to change the scrollbars in iframes in chrome



body   {
position: absolute;
overflow-y: scroll;
overflow-x: hidden;
}
html {
overflow-y: auto;
background-color: transparent;
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
display: none;
}
::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment {
height: 30px;
background-color: transparent;
}
::-webkit-scrollbar-track-piece {
background-color: #3b3b3b;
-webkit-border-radius: 16px;
}
::-webkit-scrollbar-thumb:vertical {
height: 50px;
background-color: #666;
border: 1px solid #eee;
-webkit-border-radius: 6px;
}

[#95826] Saturday, August 21, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
maximusbradforde

Total Points: 594
Total Questions: 106
Total Answers: 82

Location: Tuvalu
Member since Sat, Feb 11, 2023
1 Year ago
;