|
|
|
|
|
|
| |
The min-width property (CSS Reference)
Introduction
The min-width property can be used to specify the minimum
width of an element.
Note: Please check if the browser you're targeting supports this property yet. Many don't, at the time of
publishing.
Example
<!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>min-width
Demonstration</title>
<style type="text/css">
p.minwidth
{
min-width: 250px;
}
</style>
</head>
<body>
<h1><p>min-width demonstration</p></h1>
<p class="minwidth">This is an element with
the min-width of 250px</p>
</body>
</html>
Values
|
Name:
|
Description:
|
|
length
|
The following values can be also used to define the
minimum width:
cm (centimeter)
em (ems)
inch (inches)
mm (millimeters)
pc (picas)
px (pixels)
pt (points)
|
|
percentage
|
This value can be used to define the minimum width with
percentages. You have to use the percentage sign %.
|
|
|
|
|
|
|
|
|