p overflow: scroll;
<!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'>
<head>
<title>overflow</title>
<style type='text/css'>
p {
font: 12px sans-serif;
border: 1px solid gold;
background: lightyellow;
padding: 5px;
width: 100px;
height: 100px;
float: left;
margin: 5px;
}
p#visible {
overflow: visible;
}
p#auto {
overflow: auto;
}
p#scroll {
overflow: scroll;
}
p#hidden {
overflow: hidden;
}
</style>
</head>
<body>
<p id='visible'>
Peter Piper picked a peck of pickled peppers.
Did Peter Piper pick a peck of pickled peppers?
If Peter Piper picked a peck of pickled peppers,
where's the peck of pickled peppers Peter Piper picked?
</p>
<p id='auto'>
Peter Piper picked a peck of pickled peppers.
Did Peter Piper pick a peck of pickled peppers?
If Peter Piper picked a peck of pickled peppers,
where's the peck of pickled peppers Peter Piper picked?
</p>
<p id='scroll'>
Peter Piper picked a peck of pickled peppers.
Did Peter Piper pick a peck of pickled peppers?
If Peter Piper picked a peck of pickled peppers,
where's the peck of pickled peppers Peter Piper picked?
</p>
<p id='hidden'>
Peter Piper picked a peck of pickled peppers.
Did Peter Piper pick a peck of pickled peppers?
If Peter Piper picked a peck of pickled peppers,
where's the peck of pickled peppers Peter Piper picked?
</p>
</body>
</html>
Related examples in the same category