22 Aug 2015

Learn What is Overflow in CSS

First Create HTML file as given here:

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="css/primary.css">
    </head>
    <body>
        <div id="container">
            This is some content. This is some content. This is some content. This is some content. This is some content. This is some content. This is some content. This is some content. 
            This is some content. This is some content. This is some content. This is some content. This is some content. This is some content. This is some content. This is some content. 
            This is some content. This is some content. This is some content. This is some content. This is some content. This is some content. This is some content. This is some content. 
        </div>
    </body>
</html>

Create CSS file as given here:

#container{
    width: 200px;
    background: #aaa;
    height: 200px;
    overflow-y: scroll; 
}
Share:

0 comments:

Post a Comment