Click here to Skip to main content
15,905,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey guys i have one question using background image size contain or cover property how do i set background image fit(full width) to web page but with certain height. i'm trying to do this layout. it is given in the comment box please take a reference of that. so anyone know how to do that and also i want add two images on the background image like what is in image:- "two ktm images on one blue Lamborghini background image"? please give me example i'm new in this. also i have provided my code link what i have tried.

What I have tried:

my code
Edit fiddle - JSFiddle[^]

what i have tried using background size property but image is not displaying full size and if i use contain property then image is full but not full fit width. Image Reference Link ibb.co/b1G0Fa What I'm Actually trying to make like this Layout
Posted
Updated 21-Jul-17 4:00am
v2

1 solution

Use width:100%; and height:100%; for image.

And in responsive image height will change depending upon it width
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900