Overflow auto method demonstrated : overflow : Box Model HTML CSS TUTORIALS


HTML CSS TUTORIALS » Box Model » overflow »

 

Overflow auto method demonstrated


 
<!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">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
#parent1 {
  border: 5px solid purple;
  padding: 10px;
  overflow: auto;
  width: 100%;
}

.floatleft {
  border: 5px solid red;
  float: left;
  width: 200px;
  background: white;
}

.floatright {
  border: 5px solid green;
  float: right;
  width: 200px;
  background: white;
}
</style>
</head>

<body>
<div id="parent1">
<p>This is the first parent container</p>
<p class="floatleft">This is floated content.</p>
<p class="floatright">This is floated content.</p>
</div>
</body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Box Model
» overflow