Challenge: Apply Relative Positioning
Note
Each challenge in this course includes a code sample consisting of
index.htmlandindex.cssfiles. As the course focuses on learning CSS, it is recommended to address the challenges in theindex.cssfile. Once a challenge is completed, click the "Run Code" button to view the live page and ensure the challenge was solved correctly.Moreover, each challenge provides "Hint" and "Solution" buttons. Clicking the "Hint" button will display hints relevant to the current task, while the "Solution" button will reveal the code sample with the correct application of CSS.
Task
- Add
relativepositioning to the second element with theitemclass name. - Move the item
30pxdown and50pxleft.
index.html
index.css
- Move down by setting a positive value for the
topproperty. - Move left by setting a negative value for the
leftproperty.
index.html
index.css
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.04
Challenge: Apply Relative Positioning
Swipe to show menu
Note
Each challenge in this course includes a code sample consisting of
index.htmlandindex.cssfiles. As the course focuses on learning CSS, it is recommended to address the challenges in theindex.cssfile. Once a challenge is completed, click the "Run Code" button to view the live page and ensure the challenge was solved correctly.Moreover, each challenge provides "Hint" and "Solution" buttons. Clicking the "Hint" button will display hints relevant to the current task, while the "Solution" button will reveal the code sample with the correct application of CSS.
Task
- Add
relativepositioning to the second element with theitemclass name. - Move the item
30pxdown and50pxleft.
index.html
index.css
- Move down by setting a positive value for the
topproperty. - Move left by setting a negative value for the
leftproperty.
index.html
index.css
Thanks for your feedback!