Complete the code to make the box position relative.
div {
position: [1];
width: 100px;
height: 100px;
background-color: lightblue;
}The position property set to relative allows the element to be positioned relative to its normal position.
Complete the code to move the box 20px down from its normal position.
div {
position: relative;
top: [1];
width: 100px;
height: 100px;
background-color: coral;
}The top property moves the element down when positive and up when negative, relative to its normal position.
Fix the error in the code to correctly position the box relative and move it 15px left.
div {
position: [1];
left: -15px;
width: 80px;
height: 80px;
background-color: lightgreen;
}To move an element with left, its position must be relative, absolute, or fixed. Here, relative is correct.
Fill both blanks to create a relative positioned box moved 10px right and 5px up.
div {
position: [1];
left: [2];
top: -5px;
width: 90px;
height: 90px;
background-color: peachpuff;
}Setting position to relative allows moving the box. The left property with 10px moves it right. Negative top moves it up.
Fill all three blanks to create a relative box moved 25px down, 15px left, with a blue border.
div {
position: [1];
top: [2];
left: [3];
width: 120px;
height: 120px;
border: 2px solid blue;
background-color: lavender;
}Use relative position to move the box. top: 25px moves it down, left: -15px moves it left.