Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 504 Bytes

spacing_dimensions.md

File metadata and controls

10 lines (7 loc) · 504 Bytes
  1. Use CSS to set a fixed width on the image of 800 pixels, and center it in the window horizontally.

img { display: block; /* img is normally inline and need to change to block to center on page width: 800px; margin: 0 auto; }

  1. Using the code from the previous problem, change the width property for img to 100%, and set the max-width property to 800px. The image should expand to fit any container width up to 800 pixels. Resize your browser width and watch how that affects the photograph.