Quiz App

test your knowledge about css

  • Why use calc(50% - 16px) instead of just 50% for card width?

    To account for the gap between cards. Pure 50% would make cards too wide when there's spacing between them.

    • css
    • layout
    • calc
  • What does flex-wrap: wrap do?

    It allows flex items to wrap onto multiple lines when they don't fit in one line, instead of shrinking or overflowing.

    • css
    • flexbox
    • layout
  • What does z-index control in CSS?

    It controls the stacking order of positioned elements. Higher values appear on top of lower values.

    • css
    • positoning
    • z-index
  • Why do we use CSS Custom Properties(variables)?

    To manage values centrally in one place. When you change a variable, it updates everywhere it's used automatically.

    • css
    • variables
  • What is :root in CSS?

    :root is a selector that targets the top-most element (html element) and is used to define CSS Custom Properties that are available everywhere.

    • css
    • selectors
  • What does inherit do in CSS?

    It makes an element take the same property value as its parent element.

    • css
    • positoning
  • What's the difference between position: fixed and position: absolute?

    Fixed positions an an element relative to the browser window and it stays in place when scrolling. Absolute positions relative to the nearest positioned parent and scrolls with the content.

    • css
    • positoning