How to display background image from url
I am unable to display background image with css, my research on the web has been fruitless, seemingly I am using the same markup and stylesheet as in stack overflow posts but it is just not working for me.
Can you help me identify the problem?
https://codepen.io/FLAMESpl/pen/QWJKgNJ
My HTML:
My stylesheet:
2 Replies
you are getting the image, the issue is that it is very large so can't see any of it, especially as the image top-left-hand corner is transparent.
Add
background-size: cover;
to your element to make it fit to the size of the elementThank you a million I would never guess it