background img dont work
hello i try to put img for my nav bar but it doesnt work..
heres my code in css:
the image route is correct and i dont know whats the problem why the image doesnt show..
/* CSS Document */
background: url('../img/bg.PNG') bottom center no-repeat;
background: url('../img/bg.PNG') top center no-repeat;
The relative URLs in your stylesheet are probably incorrect. Keep in mind that relative URLs in stylesheets are relative to the location of the stylesheet, not the parent HTML document. Try changing to complete URLs (ie. 'http://www.example.com/img/bg.PNG'). If those work then you know your relative URLs are incorrect.
See for example http://www.w3schools.com/css/css_background.asp
You seem to be mixing "specific" (-image) rules and "shorthand" background- rules. Believe, when you specify background-image, you do not include other aspects (such as no-repeat). Likewise, when you use background: shorthand, you have to include at least one other related property (such as color, position, etc.).
CSS properties used for background effects:
Also wonder about the one that has no position specified?
Check your paths, as the other poster mentioned. Also, avoid inline-block. It's problematic. Display it as 'block' but float it left.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)