How to Make a CSS Element Take The Full Screen Width

How Do You Make an Element Take The Whole Screen Width? Source: Igor Miske

Struggling to make an image or container take the full screen width 😫?

Here’s a quick tutorial on how this can be done in just four CSS lines 😄

Let’s Make a New Image 🖼️

I’ve made the following Code Pen with an image of a cute koala that will soon take up the entire horizontal length of the screen:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Oliver Carmont

Oliver Carmont


UI/UX Designer that produced tech tutorials in Berkeley, CA.