|
|
|
|
|
|
| |
The right property (CSS Reference)
Introduction
The right property is used to determine the absolute
position from right for the content. This property is best used with the
property position. The following example demonstrates the usage and positions 3
strings from right.
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>right Demonstration</title>
<style type="text/css">
p.right0
{
position:absolute;
right:0px;
}
p.right1
{
position:absolute;
right:25px;
}
p.right2
{
position:absolute;
right:50px;
}
</style>
</head>
<body>
<h1><p>The text should be somewhere at the
right.</p></h1>
<h1><p class="right0">Hello
World0</p></h1><br/>
<h1><p class="right1">Hello
World1</p></h1><br/>
<h1><p class="right2">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 right
distance:
cm (centimeter)
em (ems)
inch (inches)
mm (millimeters)
pc (picas)
px (pixels)
pt (points)
|
|
percentage
|
Defines the distance of the content from right in
percentages. You have to use the percentage sign %.
|
|
|
|
|
|
|
|
|