From: Mohit Sindhwani Date: 2009-04-16T01:31:33+09:00 Subject: Re: Background image defined in stylesheet doesn't display Rob Blimploid wrote: > application.html.erb is correctly finding the stylesheet for my project > via <%= stylesheet_link_tag 'style1' %>. My webpages reflect the > styling properly with a few exceptions .. the most notable being some > .jpg images defined for background do not display at all. I have those > images in public/images. > > So, the URL for the images is images/... relative to the path of your application. > The following is the stylesheet code containing the reference to the > image. > > #navigation { > width: 180px; > height: 484px; > background: #7da5a8 url(backgrounds/nav-bg.jpg) no-repeat; > } If your stylesheet is in public/stylesheets/styles.css [example], then the relative path to the images directory is: url(../images/...jpg) or url(../images/backgrounds/image.jpg) depending on where exactly you placed the files. Cheers, Mohit. 4/16/2009 | 12:30 AM.