Viewport
Viewport
We're going to have a small letterbox-style viewport that will contain our sea/ports/ship:

Challenge
Use HTML and CSS (including flexbox) to create the above.
To complete this challenge, you will need to:
- Style your
htmlandbodyelements so they have a height of100%. - Style your
bodyso its background is black. - Set the
bodyas a flex container and ensure any children are center aligned on both the horizontal and vertical axis. - Create a
divtag inside your body with an id attribute ofviewport. - Style the
viewportelement (using an ID CSS selector) so it has the following properties:- a width of
640px - a height of
256px - a
positionofrelative - an
overflow-xofauto - a
background-imagewhich should be thewater0.pngimage.
- a width of
Make sure you understand what all of these style rules do before you move on!