HTML DOM minHeight Property
Complete Style Object Reference
Definition and Usage
The minHeight property sets the minimum height of an element.
Syntax
Object.style.minHeight=length|%
|
Possible Values
Value |
Description |
length |
Defines the minimum height in px, cm, etc. |
% |
Defines the minimum height in % of the containing block |
Example
The following example sets the minimum height of an element box:
<html>
<head>
<script type="text/javascript">
function setMinHeight()
{
document.getElementById("p1").style.minHeight="200px";
}
</script>
</head>
<body>
<p id="p1">This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.</p>
<input type="button" onclick="setMinHeight()"
value="Set min height" />
</body>
</html>
|
Try-It-Yourself Demos
minHeight - Set minimum height of an element box
Complete Style Object Reference
|
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|