|
|
|
|
|
|
| |
The left property (CSS Reference)
Introduction
The left property is used to determine the absolute position
from left for the content. This property is best used with the property
position. The following example demonstrates the usage and positions 3 strings
from left.
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>
<style type="text/css">
p.left0
{
position:absolute;
left:0px;
}
p.left1
{
position:absolute;
left:25px;
}
p.left2
{
position:absolute;
left:50px;
}
</style>
<title>left Demonstration</title>
</head>
<body>
<h1><p>The text should be somewhere at the
left.</p></h1>
<h1><p class="left0">Hello
World0</p></h1><br/>
<h1><p class="left1">Hello
World1</p></h1><br/>
<h1><p class="left2">Hello
World2</p></h1>
</body>
</html>
Output

Values
|
Name:
|
Description:
|
|
auto
|
Defines the position automatically.
|
|
length
|
The following values can be also used to define the left
distance:
cm (centimeter)
em (ems)
inch (inches)
mm (millimeters)
pc (picas)
px (pixels)
pt (points)
|
|
percentage
|
Defines the distance of the content from left in
percentages. You have to use the percentage sign %.
|
|
|
|
|
|
|
|
|