TiestoClubLife Posted May 6, 2013 Report Share Posted May 6, 2013 Я только только начал изучать веб програмирование, по этому прошу строго не судить )Проблема такая: Никак не могу поставить фон на своём сайте.Ставлю такой код, и в итоге у меня только фон залитый серым цветом , вместо нужной картинки:body { background:url('images/Fon.png') #373e45 no-repeat 50% 0; word-wrap: break-word; } Quote Link to comment Share on other sites More sharing options...
0 Kray Storm Posted May 6, 2013 Report Share Posted May 6, 2013 (edited) Проверить путь к изображению было бы быстрее, чем создавать отдельный пост с самой банальной ошибкой. Edited May 6, 2013 by Kray Storm Quote Link to comment Share on other sites More sharing options...
0 TiestoClubLife Posted May 6, 2013 Author Report Share Posted May 6, 2013 Спасибо, но ссылка на изображение работает, а путь к картике нет:Так Работает : body { background:url(http://s2.goodfon.ru/image/9763-1920x1200.jpg) #373e45 no-repeat 50% 0; word-wrap: break-word; } А так нет: body { background:url("/public_html/templates/gamer-android/images/fon.jpg") #373e45 no-repeat 50% 0; word-wrap: break-word; } body { background:url("/images/fon.jpg") #373e45 no-repeat 50% 0; word-wrap: break-word; } body { background:url(images/fon.jpg) #373e45 no-repeat 50% 0; word-wrap: break-word; } body { background:url("../images/fon.jpg") #373e45 no-repeat 50% 0; word-wrap: break-word; } Quote Link to comment Share on other sites More sharing options...
0 potato Posted May 6, 2013 Report Share Posted May 6, 2013 исправь это: body { background:url('images/Fon.png') #373e45 no-repeat 50% 0; word-wrap: break-word; }на это: body { background:url('../images/Fon.png') #373e45 no-repeat 50% 0; word-wrap: break-word; } 1 Quote Link to comment Share on other sites More sharing options...
0 Daiver Posted May 6, 2013 Report Share Posted May 6, 2013 Так Работает : body { background:url(http://s2.goodfon.ru...3-1920x1200.jpg) #373e45 no-repeat 50% 0; word-wrap: break-word; } А так нет: body { background:url("/public_html/templates/gamer-android/images/fon.jpg") #373e45 no-repeat 50% 0; word-wrap: break-word; } body { background:url("/images/fon.jpg") #373e45 no-repeat 50% 0; word-wrap: break-word; } body { background:url(images/fon.jpg) #373e45 no-repeat 50% 0; word-wrap: break-word; } body { background:url("../images/fon.jpg") #373e45 no-repeat 50% 0; word-wrap: break-word; }Я знакома с этим хостингом. Тут не надо прописывать public_htmlТо есть вместоbody { background:url("/public_html/templates/gamer-android/images/fon.jpg") #373e45 no-repeat 50% 0; word-wrap: break-word; }нужно писатьbody { background:url("/templates/gamer-android/images/fon.jpg") #373e45 no-repeat 50% 0; word-wrap: break-word; }Папка public_html считается корневой папкой сайта. Quote Link to comment Share on other sites More sharing options...
0 TiestoClubLife Posted May 6, 2013 Author Report Share Posted May 6, 2013 Большое Спасибо.Вот правельный вариант:body { background:url("/templates/gamer-android/images/fon.jpg") #373e45 no-repeat 50% 0; word-wrap: break-word; } Quote Link to comment Share on other sites More sharing options...
Question
TiestoClubLife
Я только только начал изучать веб програмирование, по этому прошу строго не судить )
Проблема такая: Никак не могу поставить фон на своём сайте.
Ставлю такой код, и в итоге у меня только фон залитый серым цветом , вместо нужной картинки:
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.