I'm trying to set a background image on 1 of the pages in my Rails 3 app, but it's not showing.
What am I doing wrong?? Here is the relevant code:
<div class="hero-unit" style="background: url('public/assets/fks.JPG') ;">
Thanks,
Faisal
I'm trying to set a background image on 1 of the pages in my Rails 3 app, but it's not showing.
What am I doing wrong?? Here is the relevant code:
<div class="hero-unit" style="background: url('public/assets/fks.JPG') ;">
Thanks,
Faisal
Try this:
<div class="hero-unit" style="background: url('assets/fks.JPG') ;>
Better still:
<div class="hero-unit" style="background-image: url(<%= asset_path 'fks.JPG' %>) ;>