O
O
Obwabi2015-10-28 00:57:14
css
Obwabi, 2015-10-28 00:57:14

Why doesn't background-image work?

There is the following background code
: url("img/btn.png");
but it does not work, I tried different ways, it still does not plow, what should I do?
This has never happened before

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
Mesuti, 2017-08-29
@Mesuti

To css url(../img/btn.png)
To htmlurl(img/btn.png)

H
holfza, 2015-10-28
@holfza

Maybe the element's height is 0? Or the path to the image is not correct. https://jsfiddle.net/85q5vq4k/2/

M
Mr Crabbz, 2015-10-28
@Punkie

F12 in any browser - Select the desired element and see the error. 99% that the wrong path to the picture.

T
timtimIT, 2015-10-28
@timtimIT

Do you have the img folder in the css folder?

M
Maxim Sofronov, 2015-10-28
@maxsof

perhaps the path from the root needs to be specifiedbackground: url("/img/btn.png");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question