0
0
CSSmarkup~20 mins

Position static in CSS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Position Static Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the default position property
What is the default behavior of an element with position: static; in CSS?
AThe element is absolutely positioned relative to the initial containing block.
BThe element is positioned relative to its nearest positioned ancestor and can be moved using top, bottom, left, and right.
CThe element is positioned according to the normal flow of the page and ignores top, bottom, left, and right properties.
DThe element is fixed relative to the viewport and does not move when scrolling.
Attempts:
2 left
💡 Hint
Think about how elements behave when you don't set any position property.
📝 Syntax
intermediate
1:30remaining
CSS position property syntax
Which CSS snippet correctly sets an element's position to static?
Aposition: 'static';
Bposition = static;
Cpos: static;
Dposition: static;
Attempts:
2 left
💡 Hint
Remember the correct CSS property syntax uses a colon and no quotes for values.
rendering
advanced
2:30remaining
Visual effect of position static with offsets
Given this CSS:
div {
  position: static;
  top: 20px;
  left: 30px;
  background-color: lightblue;
  width: 100px;
  height: 100px;
}

What will you see in the browser?
AA light blue box 100x100 pixels positioned normally ignoring top and left offsets.
BA light blue box shifted 20px down and 30px right from its normal position.
CNo box visible because top and left cause an error with static position.
DA light blue box fixed at 20px from top and 30px from left of the viewport.
Attempts:
2 left
💡 Hint
Remember how position: static; treats offset properties.
selector
advanced
2:00remaining
Selecting elements with static position
Which CSS selector will select only elements that have position: static; explicitly set in their inline style attribute?
A.static
B[style*='position: static']
Cdiv[position='static']
D:static
Attempts:
2 left
💡 Hint
Think about attribute selectors and how inline styles are matched.
accessibility
expert
3:00remaining
Accessibility impact of position static on keyboard navigation
How does using position: static; affect keyboard navigation and screen reader accessibility compared to other position values?
AElements with <code>position: static;</code> remain in the normal tab order and are read in document order by screen readers.
BElements with <code>position: static;</code> are removed from the tab order and ignored by screen readers.
CElements with <code>position: static;</code> become fixed on screen and trap keyboard focus.
DElements with <code>position: static;</code> automatically get ARIA roles for better accessibility.
Attempts:
2 left
💡 Hint
Think about how normal flow affects focus and reading order.