How to Stretch Image Using CSS

If you are having a hard time on How to Stretch Image Using CSS, this tutorial will surely help you with your problem and it works well. The method that you are about to learn is just simple and very easy to follow. This is so very responsive even in mobile or desktop view.The position of the image is fixed and cannot be scroll down. It works pretty well for the background of the page.

Below are the following step by step guide on How to Stretch Image Using CSS.

Lets Begin:

First Step: Create a  landing page and name it “index.php“.

Second Step: Create a CSS class to stretch the background image of the page.


<style type=”text/css”>
#bacgroundimage {
width: 100%;
height: 100%;
position: fixed;
left: 0px;
top: 0px;
z-index: -999;

.stretch-image {


Third Step: Do the following codes for displaying an image.



If you have any questions or suggestion about on How to Stretch Image Using CSS, please feel free to contact us at our contact page.You can subscribe this site to see more of my tutorials.

You can also view these tutorials below:

Leave a Comment