top: ***; right: ***; bottom: ***; left: ***;
Browser |
|
---|
The top, right, bottom, and left properties specifies the display position of the box.
When you set these properties, the relative, absolute, or fixed value must be specified for the position property.
div {
position: absolute;
top: 10px;
left: 30%;
}
Property | Value | Explanation |
---|---|---|
top | length, %, or auto | the distance from the top side |
right | length, %, or auto | the distance from the right side |
bottom | length, %, or auto | the distance from the bottom side |
left | length, %, or auto | the distance from the left side |
The default is "auto".