Difference between revisions of "CSS GUIDE RIGHT"

From CDOT Wiki
Jump to: navigation, search
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<span style="margin:0;background:#ffff33;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;">This document is a work in progress and is subject to change.</span><br /><br />
 
<span style="margin:0;background:#ffff33;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;">This document is a work in progress and is subject to change.</span><br /><br />
== Summary ==
+
== Summary ==  
 
The right property is used to horizontally offset from the right edge of an element.
 
The right property is used to horizontally offset from the right edge of an element.
 
<table border="0">
 
<table border="0">
 
<tr>
 
<tr>
<td><b>Applicability:</b></td><td>The right property can be used for all CSS elements.<td>
+
<td><b>Applicability:</b></td><td>The right property can be used for positioned elements.<td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 74: Line 74:
  
 
== Browser Compatibility ==
 
== Browser Compatibility ==
 +
* Netscape 6, 7
 +
* Mozilla 1
 +
* Firefox 1, 2
 +
* Internet Explorer 5, 6
  
 
== See Also ==
 
== See Also ==
Line 79: Line 83:
 
* [http://zenit.senecac.on.ca/wiki/index.php?title=CSS_GUIDE_BOTTOM bottom property]
 
* [http://zenit.senecac.on.ca/wiki/index.php?title=CSS_GUIDE_BOTTOM bottom property]
 
* [http://zenit.senecac.on.ca/wiki/index.php?title=CSS_GUIDE_TOP top property]
 
* [http://zenit.senecac.on.ca/wiki/index.php?title=CSS_GUIDE_TOP top property]
 +
* [http://zenit.senecac.on.ca/wiki/index.php?title=CSS_GUIDE_OVERFLOW overflow property]
 +
* [http://zenit.senecac.on.ca/wiki/index.php?title=CSS_GUIDE_POSITION position property]
 +
* [http://zenit.senecac.on.ca/wiki/index.php?title=CSS_GUIDE_VERTICAL_ALIGN vertical-align property]
 +
* [http://zenit.senecac.on.ca/wiki/index.php?title=CSS_GUIDE_Z_INDEX z-index property]

Latest revision as of 15:14, 11 September 2007

This document is a work in progress and is subject to change.

Summary

The right property is used to horizontally offset from the right edge of an element.

Applicability:The right property can be used for positioned elements.
Media Group: Visual
Inherited:No
Default Value:auto

Syntax

TARGET_ELEMENT{right: inhert !important}
TARGET_ELEMENT{right: auto}
TARGET_ELEMENT{right: 20%}
TARGET_ELEMENT{right: 20px}

Legal Values

ValueDescription
inheritExplicitly sets the value to that of the parent
autoAllows the browser to calculate the right position of the element
percentageSets the right position in a percentage from the right edge. Can be 0%-100%
lengthSets the right position in pixels (px), centimeters (cm), etc, from the right edge.

Mozilla Recommended Values

Usage Examples

p{
position: absolute;
right: 20px
}

img{
position: absolute;
right: 15%
}

div{
position: absolute;
right: auto
}

Notes

When right property is used with the position property, if the position property has a value of "static", the right property has no effect on the element.

Specification Conformance

Browser Compatibility

  • Netscape 6, 7
  • Mozilla 1
  • Firefox 1, 2
  • Internet Explorer 5, 6

See Also