You are designing a responsive website and want a box to always be 10% of the viewport width. Which CSS value would you use?

  • %
  • em
  • px
  • vw
To make a box 10% of the viewport width, you should use the 'vw' (viewport width) unit. The 'vw' unit is based on the width of the viewport, making it ideal for responsive design. It ensures the box is always a percentage of the viewport's width, regardless of the screen size.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *