0
0
CSSmarkup~10 mins

Background position in CSS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the background image position to the top left corner.

CSS
background-position: [1];
Drag options to blanks, or click blank then click option'
Arepeat
Bcenter
Cbottom right
Dtop left
Attempts:
3 left
💡 Hint
Common Mistakes
Using repeat which is for background-repeat, not position.
Using only one keyword like top without the horizontal position.
2fill in blank
medium

Complete the code to center the background image horizontally and vertically.

CSS
background-position: [1];
Drag options to blanks, or click blank then click option'
Abottom left
Btop right
Ccenter center
Dleft center
Attempts:
3 left
💡 Hint
Common Mistakes
Using only one center which defaults the other axis to top or left.
Confusing background-position with background-repeat.
3fill in blank
hard

Fix the error in the code to correctly position the background image 20 pixels from the left and 10 pixels from the top.

CSS
background-position: [1];
Drag options to blanks, or click blank then click option'
A20px 10px
B10px 20px
Cleft 20px top 10px
D20px top 10px
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the pixel values order.
Mixing keywords and pixel values incorrectly.
4fill in blank
hard

Fill both blanks to position the background image at the bottom right corner using keywords.

CSS
background-position: [1] [2];
Drag options to blanks, or click blank then click option'
Abottom
Bright
Ctop
Dleft
Attempts:
3 left
💡 Hint
Common Mistakes
Reversing the order of horizontal and vertical keywords.
Using top or left instead of right or bottom.
5fill in blank
hard

Fill all three blanks to position the background image 15 pixels from the left, 25 pixels from the top, and prevent it from repeating.

CSS
background-position: [1] [2]; background-repeat: [3];
Drag options to blanks, or click blank then click option'
A15px
B25px
Cno-repeat
Drepeat
Attempts:
3 left
💡 Hint
Common Mistakes
Using repeat instead of no-repeat.
Swapping the pixel values order.