My web page design incorporates a header, content body, and footer using Responsive and Angular Material. Within the Content Body, there is an md-content
element containing multiple text paragraphs enclosed in <p>
. I have set the overflow to auto (overflow: auto
), but unfortunately, I cannot scroll the content.
The following source code includes HTML, AngularJS, and CSS:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Angular Material style sheet -->
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css">
<style>
html, body {height: 100%; margin:0px !important;}
header{
position: fixed;
top: 0;
height: 50px;
width: 100%;
background-color: #777;
z-index: 1;
}
content{
padding-top: 50px;
padding-bottom: 50px;
background-color:#ffffcc;
position: fixed;
top:0px;
bottom:0px;
width:100%;
}
footer{
background-color: #777;
position: fixed;
bottom: 0;
height: 50px;
width: 100%;
z-index: 1;
}
contentdemoBasicUsage div.demo-content {
height: 600px; }
contentdemoBasicUsage div[ng-controller] {
height: 100%;
padding-bottom: 15px; }
contentdemoBasicUsage md-content {
padding: 24px;
height: calc(100% - 100px);
overflow:auto;
}
<...