Image url in Css file under stylesheets under public Rails 2.3 -


i working rails 2.3.5 , have images in public/images/ added css file named custom.css

#cssmenu ul {   background: url(nav-bg.png) repeat-x 0px 4px;   height: 69px; } 

how can make read image in inside public/images ? have tried did not work

#cssmenu ul {   background: url(<%= asset_path '/images/nav-bg.png' %>) repeat-x 0px 4px;   height: 69px; } 

also not work

#cssmenu ul {       background: url(<%= asset_path 'nav-bg.png' %>) repeat-x 0px 4px;       height: 69px;     } 

both examples correct:

#cssmenu ul {   background: url(../images/nav-bg.png) repeat-x 0px 4px;   height: 69px; }  #cssmenu ul {   background: url(/images/nav-bg.png) repeat-x 0px 4px;   height: 69px; } 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -