Skip to content Skip to sidebar Skip to footer

Hiding Scrollbar In Div

Hello budding web enthusiasts. I am afraid that I am in quite a pickle and need a helping hand. In a current web project, I ran into a sour wall. This here is the code. Take a gand

Solution 1:

I would use this technique:

#parent{
height: 100%;
width: 100%;
overflow: hidden;
}

#child{
width: 100%;
height: 100%;
overflow: auto;
padding-right: 15px; /* Increase this value for cross-browser compatibility */
}

Here's a working Fiddle: http://jsfiddle.net/5GCsJ/954/


Solution 2:

Here is a way to do it: HTML

<div id="content">
    <div id="left">
        <div class="richyPhoto"> </div>
    </div>

    <div id="right">
       <div class="richyPhoto2"> </div>
    </div>
</div>

CSS

body {
    overflow:hidden;
}
#content, html, body {
    height: 100%;
    width:100%;
    margin:0;
    padding:0;
}
#left {
    float: left;
    width: 50%;
    background: red;
    height: 100%;
    overflow: hidden;
}
.richyPhoto {
    width: 100%;
    height: 99%;
    border: 1px solid red;
    overflow: auto;
    padding-right: 15px;
}
#right {
    float: left;
    width: 50%;
    background: blue;
    height: 100%;
    overflow: hidden;
}
.richyPhoto2 {
    width: 100%;
    height: 99%;
    border: 1px solid blue;
    overflow: auto;
    padding-right: 15px;
}

Working Fiddle link: No scrollbars scroll


Post a Comment for "Hiding Scrollbar In Div"