I’m having problems getting a background image to load in rails.
In my public/images directory, I have a file rightimage.jpg.
In my stylesheet, I have an entry as follows:
td.rightcolumn {
background-image: url(/images/rightimage.jpg);
background-position: top left;
background-repeat: no-repeat;
}
In my layout, I have
The dummy space in the column will be replaced by text, so I can’t
simply use an <%= image-tag … %> entry - it’s going to have text over
it. On the background-image entry, I’ve tried url(images/rightimage.jpg)
and url(/images/rightimage.jpg). I can’t get the background image to
load on the page. I’m assuming that it’s because it’s not being found.
The dummy space in the column will be replaced by text, so I can’t
simply use an <%= image-tag … %> entry - it’s going to have text over
it. On the background-image entry, I’ve tried url(images/rightimage.jpg)
and url(/images/rightimage.jpg). I can’t get the background image to
load on the page. I’m assuming that it’s because it’s not being found.