HTML DOM minWidth Property
Complete Style Object Reference
Definition and Usage
The minWidth property sets the minimum width of an element.
Syntax
Object.style.minWidth=length|%
|
Possible Values
Value |
Description |
length |
Defines the minimum width in px, cm, etc. |
% |
Defines the minimum width in % of the containing block |
Example
The following example sets the minimum width of an element box:
<html>
<head>
<script type="text/javascript">
function setMinWidth()
{
document.getElementById("p1").style.minWidth="1000px";
}
</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="setMinWidth()"
value="Set min width" />
</body>
</html>
|
Try-It-Yourself Demos
minWidth - Set min width of an element box
Complete Style Object Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
|
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|