property
right — CSS reference
Physical right inset. Initial auto; not inherited. For an absolutely positioned box, a length offsets the corresponding edge of its margin box from the containing block edge. Percentages resolve against the corresponding containing-block dimension; sticky uses scrollport dimensions for its inset percentages. Relative positioning offsets from the normal position. Static boxes ignore insets.
Formal Syntax & Structure
css syntaxcss
auto | <length-percentage>Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS positioning lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#p{width:240px;height:160px;background:#e6eef2} #a{width:60px;height:30px;background:#128579} #b{height:20px;background:#adcde8}#p{position:relative}#a{position:absolute;right:25px}</style><body><div id="p"><div id="a">A</div><div id="b">B</div></div></body></html>