HTML/CSS/Box Model/max height — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 09:21, 26 мая 2010
max-height: 200px
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title></title>
<style type="text/css">
p {
padding: 10px;
margin: 10px;
border: 1px solid black;
background: lightgray;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
max-height: 200px;
}
</style>
</head>
<body>
<p>
This is a test.
</p>
</body>
</html>
max-width, min-width,max-height
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/xhtml; charset=windows-1252" />
<meta http-equiv="content-language" content="en-us" />
<style type="text/css">
div#body {
margin: auto;
max-width: 50em;
min-width: 30em;
max-height: 30em;
overflow: auto;
background: #ccc;
}
</style>
</head>
<body>
<div id="body">
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test. <BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test. <BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
<BR/>This is a test.
</div>
</body>
</html>