Return to Snippet

Revision: 847
at August 14, 2006 16:31 by hxseven


Initial Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>example page</title>
    
    <style type="text/css" media="all">
    
        body {
            font-family: Verdana;
            font-size: 90%;
        }
        
        #scroll_box {
            border: 1px solid #ccc;
            height: 120px;    
            width: 400px;            
            overflow: auto;            
            margin: 1em 0;
        }
        
    </style>
</head>

<body>

<div id="page">

    <h1>Title</h1>
        
    <div id="scroll_box">
    <p>
        
        Put a long text in here. It will be scrollable.<br/>
        Put a long text in here. It will be scrollable.<br/>
        Put a long text in here. It will be scrollable.<br/>
        Put a long text in here. It will be scrollable.<br/>
        Put a long text in here. It will be scrollable.<br/>
        Put a long text in here. It will be scrollable.<br/>
        Put a long text in here. It will be scrollable.<br/>

    </p>
    </div>
    
    <p>
        This content follows after the scrollable box.
    </p>

</div>

</body>
</html>

Initial URL
http://codedump.jonasjohn.de/snippets/scrollable-div-box.htm

Initial Description
Shows how to create a DIV box that is scrollable and looks like a IFRAME.

Initial Title
Scrollable DIV-Box

Initial Tags
css

Initial Language
CSS