r/beginnerwebdev • u/Meldzha • Jan 24 '19
Background image @ Codepen
Hey guys,
I am struggling with a simple thing. Just started a new project for a product selling page but I can't upload a background image for my showcase. I mean I made a nav bar inside the header and made another <div> container for the image inside header. Added a class for the <div> and inside CSS tried background-image: url(); and background:url(); aswell. Can you explain me this simple thing?
Thank you in advance!
Here is my code: https://codepen.io/Meldzha/pen/RvWWNg
2
Upvotes
View all comments
Show parent comment
1
u/[deleted] Jan 24 '19
Ah, well, can't really help you there. If you made a svg element, wrapped it in a <section> tag and gave it a width and height of 100% it could overlay the svg and function as a background image.
Or you can just use the image as the background-image for the body element and change the colour on your navbar from "lightgray" to an equal haxvalue that also has an alphavalue so you can give it opacity.