barman Posted December 27, 2010 Report Share Posted December 27, 2010 Не отображается фон у DIV'а (хтмл)вот такое свойство у дива { background: url('des/img.gif') 0 0 no-repeat fixed; width: 920px; height: 59px; margin: 144px auto 0; }путь к фону указал правильныйпри просмотре в браузерах, фон у дива не отображаетсяв чем ошибка? Quote Link to comment Share on other sites More sharing options...
0 Great Rash Posted December 27, 2010 Report Share Posted December 27, 2010 Проблема может быть в параметре fixed. Подробнее надо смотреть на живом примере. Quote Link to comment Share on other sites More sharing options...
0 barman Posted December 27, 2010 Author Report Share Posted December 27, 2010 (edited) вот css* { margin: 0; padding: 0; }body { background: #c0d1e3 url('des/bg.gif') repeat-x fixed; text-align: center; }#up { width: 904px; height: 3px; margin: 10px auto 0; background: transparent url('des/up.gif') no-repeat;}#head {width: 902px; height: 139px; margin: 0 auto; border-left: 1px solid #979c98; border-right: 1px solid #979c98; background: #d9e2da;}#qw { background: url('des/img.gif') 0 0 no-repeat fixed; width: 920px; height: 59px; margin: 0 auto; }html<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <meta content="text/html; charset=Windows-1251 " http-equiv="content-type"> <link rel="stylesheet" href="style.css" type="text/css"> <title>qwe</title></head><body> <div id="up"></div><div id="head"></div><div id="qw"></div></body></html>да и вообще блок, оказывается, не отображается Edited December 27, 2010 by barman Quote Link to comment Share on other sites More sharing options...
0 barman Posted December 27, 2010 Author Report Share Posted December 27, 2010 (edited) проблему решил пропустил символ ; Edited December 27, 2010 by barman Quote Link to comment Share on other sites More sharing options...
0 st2b Posted July 28, 2011 Report Share Posted July 28, 2011 Здравствуйте! Походу у меня та же проблема с параметром fixed/no-repeat.Пишу: background-image: url(img/ba1.jpg) - все работаетПишу: background-image: url(img/ba1.jpg) no-repeat fixed - не отображает фоновую картинкуПодскажите, пожалуйста в чем дело? Спасибо. Quote Link to comment Share on other sites More sharing options...
0 Vlad Posted July 28, 2011 Report Share Posted July 28, 2011 У background-image нет значения no-repeat и fixed. Используйте background. Quote Link to comment Share on other sites More sharing options...
0 st2b Posted July 28, 2011 Report Share Posted July 28, 2011 У background-image нет значения no-repeat и fixed. Используйте background.Огромное спасибо! Получилось. Quote Link to comment Share on other sites More sharing options...
Question
barman
Не отображается фон у DIV'а (хтмл)
вот такое свойство у дива { background: url('des/img.gif') 0 0 no-repeat fixed; width: 920px; height: 59px; margin: 144px auto 0; }
путь к фону указал правильный
при просмотре в браузерах, фон у дива не отображается
в чем ошибка?
Link to comment
Share on other sites
6 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.