1

I'm using the plugin iscroll just in my data-role="content" but there's a huge scrollbar appearing in my full page: scrollbar

I already tried some solutions found here in SO like:

  1. pilsetnieks's answer
  2. Alexander Prokofyev's answer
  3. jao's answer
  4. Mr_Green's answer

but none work.

I check this website too, but no luck either.

Can you help me?

My HTML:

<div data-role="content" data-theme="c">
            <div id="Container"></div>
            <div id="Treelist">
                <div id="scroller">
                    <ul id="Listview" ></ul>
                </div>
            </div>
        </div>

My CSS

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    overflow: hidden;   
}

#Treelist {
    position:relative;
    z-index:1;
    top:0; 
    bottom:0; 
    left:0;
    width:100%;
    overflow: hidden;
    /* Prevent native touch events on Windows */
    -ms-touch-action: none;
    /* Prevent the callout on tap-hold and text selection */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Prevent text resize on orientation change, useful for web-apps */
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    -ms-text-size-adjust: none;
    -o-text-size-adjust: none;
    text-size-adjust: none;
}

#scroller {
    position:relative; z-index:1;
/* Prevent elements to be highlighted on tap */
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    /* Put the scroller into the HW Compositing layer right from the start */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
}


#Treelist ul {
    position:relative;
    list-style:none;
    padding:0;
    margin:0;
    width:100%;
    text-align:left;
}

#Treelist li {
    padding:0 10px;
    height:150px;
/*  line-height:40px; */
    border-bottom:1px solid #ccc;
    border-top:1px solid #fff;
    background-color:#fafafa;
    font-size:14px;
}
Community
  • 1
  • 1
msm.oliveira
  • 211
  • 1
  • 15

2 Answers2

0

You could use this in order to hide the scrollbars:

#scroller::-webkit-scrollbar {
display: none;
}

#scroller {
-ms-overflow-style: none;
}

Just have a look at it in different browsers, I'm sure it works in Safari, IE and Chrome

Friendly Crook
  • 1,188
  • 1
  • 10
  • 13
-1

This should work in Webkit based browsers (Chrome/Safari) as well as IE 10+.

div::-webkit-scrollbar { width: 0 !important; display: none; }
div { -ms-overflow-style: none; }

Unfortunately, there is no good cross browser solutions to edit scrollbars. Scrollbars are created by the browser, and as such the amount that we can do to them is limited by what the browsers allow. I've learned it's best to just leave them alone, most people don't even notice them.

Kyle
  • 1,757
  • 1
  • 12
  • 22