How to make columns scroll independently using CSS?


Tags: css

Problem :

This is my first post here (I'm very new to all this), but I hope I'm asking it correctly.

I'm creating a webpage for my Master's thesis, and I need to have three parallel columns of text that will scroll independently of each other, much like this template

I cannot seem to get the CSS from this template to work on my website, and I'm wondering what I'm doing wrong, or if there is a better way to achieve this effect.

Thanks so much for you help!

Here's my CSS for my website

    body {
    padding:0;          
    width:100%;
    height: 100%;
    max-height: 100%;
    overflow; hidden;
    margin: 0;
    border: 0;
    background:#FFFFFF;     
    }

#title { 

    margin-bottom: 5px;
    background: #fff;
    width:100%
    z-index: 20;
    width: 100%;
    padding-top: 30px;
    }

#title h1 {

    font-family: Sorts Mill Goudy, Garamound, serif;
    font-size: 50px;
    text-align: center;
    font-weight: 100;
    color: 696969;
    line-height: 1px;
    letter-spacing: 10px;
    margin-top: 20px;   
    }



#title h2 {
    font-size: 16px;
    font-family: Sorts Mill Goudy, serif;
    text-align: center;
    font-weight: 100;
    color: #999;
    line-height: 20px;
    letter-spacing: 0px;
    }


#title ul {text-align:center; 
    padding-left, padding-right: 10px;
    padding-top: 30px;
    }

#title ul li {
    display:inline;
    font-family: "gill sans mt", "sans-serif";
    text-align: center;
    list-style:none;
    margin-left:0px;
    padding-left: 30px;
    padding-right: 30px;
    }

#title p{
    font-family: Sorts Mill Goudy Italic, Garamound, serif;
    size: 14px;
    font-weight: 300;
    background: #eee;
    padding: 10px;
    margin-left: 80px;
    margin-right: 80px;
    margin-top: 20px;
    margin-bottom: 15px;
    text-decoration: none;
    color: #000;
    }


#title a {
    color:#000;
    text-decoration: none;
    text-decoration: underline;
    }

#title a:hover {
    color: #A9A9A9;
    text-decoration: underline;
    }

/*  column settings */

#allcol {
    position: relative;
    }

#allcol h4{
    text-align: center;
    }

#col1 {
        font-family: Sorts Mill Goudy, Garamound, serif;
        text-align: left;
        float:left;
        background:#DCDCDC;
        padding-bottom:10px;
        padding-top: 10px;
        padding-left:1.5%;
        padding-right:1.5%;
        margin-left: 0px;
        width:30%;
        overflow: scroll;
        }

#col2 {     font-family: Sorts Mill Goudy, Garamound, serif;
        text-align: left;
        background: #fff;
        float:left;
        padding-bottom:10px;
        padding-top: 10px;
        padding-left:1.5%;
        padding-right:1.5%;
        width:30%;
        overflow: scroll;
        }

#col3 { font-family: Sorts Mill Goudy, Garamound, serif;
        text-align: left;
        float:left;
        background:#DCDCDC;
        padding-left:1.5%;
        padding-right:1.5%;
        padding-bottom:10px;
        padding-top: 10px;
        width:30%;
        overflow: scroll;
        }

#footer {
    clear:both;
    float:left;
    width:100%;
    border-top:1px solid #000;
    }


Solution :

http://jsfiddle.net/78PrJ/

Here is a working example. As mentioned, you'll have to set the div height.


    CSS Howto..

    CSS/HTML - How do I get text to go behind an image inside a div

    Pesudo Class and Css Role how to apply theme

    How to make tabs with html and css

    CSS\HTML - How to add Ionicons to CSS “content” property?

    How to make width grow slowly when I add element?

    how to reposition label which sits on top of the checkbox

    How to use css animate correctly?

    How to apply this effect to the last line of a text?

    How to centre a table in html using css file? [duplicate]

    How to create a dynamic-width arrow in CSS?

    How to correctly align left in CSS?

    How to center navbar elements vertically (Twitter Bootstrap)?

    How to create a button with overlapping Ribbon Shape in CSS?

    How to prevent right-to-left text appearence while using arabic language?

    How do you make a nav bar “sticky”?

    How to divide a border into 4 equal parts?

    how to use javascript to get visited link css styles

    CSS - how to place an error/hint message to the right of the input box

    How to convert a HTML/CSS template to haml/sass template? [closed]

    Why is Nexus 4 (using Chrome for Android) showing window size as 384x519 but screenshot shows 768x1038?

    How to add css to jquery backstretch?

    How to write a structured HTML/CSS?

    how to draw the # of likes bubble like what is on the right side of the facebook like button

    How can I make the ul contain li in its content box?

    show html element before sending ajax sync request

    How to modify multiple elements of a block with BEM CSS

    How do I make the text in the next line to be centered and not aligned to the left?

    How is this font face in CSS3 embedded into a css file?

    How to remove the margin top from a div with display table-cell?

    How to get the CSS left, top, width, height from coords?