Background image not loading in meteor


#1

Hi
I have a background image under the public folder but I am not able to see the background image. Below is the code.

Pls help.
Thanks


#2

… codes missing :neutral_face:


#3

Code below – dont know why the html template code is not visible when i submit. But its a simple code with a template named “home” and below the template declaration, a body tag with style background-image: url(’/public/bg.jpg’)


#4

Templates go in body tags not the other way around. That could be one issue.


#5
the template tag has just the name and the body tag is outside of the template tag. It works if the change the background image to a background color.

#6

Yea dont use public in the path. Just do background: url('/bg.jpg'); and try that.


#7

this worked. Thanks :smile:


#8

:sunglasses:

20charslimitisdumb


#9

How can i add a linear gradient to the image:

background: linear-gradient(to right bottom, rgba(37, 39, 77, 0.747), rgba(37, 39, 77, 0.781), url('/img/bus.jpeg'));

That is not working.