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 <td class="rightcolumn"> </td> 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. How do I get a background image to load in rails? Thanks in advance. ---Michael -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> 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. > > How do I get a background image to load in rails? >Try: background-image: url(../images/rightimage.jpg); Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Michael Trier wrote:> > 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. > > > > How do I get a background image to load in rails? > > > > Try: > > background-image: url(../images/rightimage.jpg); > > MichaelI use this... background-image: url("/images/watermark.jpg") _Kevin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Michael Trier wrote:> > Try: > > background-image: url(../images/rightimage.jpg); >No good. Still doesn''t load. ---Michael -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
_Kevin wrote:> Michael Trier wrote: >> >> background-image: url(../images/rightimage.jpg); >> >> Michael > > I use this... > > background-image: url("/images/watermark.jpg")The addition of quotes looked like something I''d miss, but it still doesn''t load. Thanks for trying ---Michael -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Michael Satterwhite wrote:> Michael Trier wrote: > > > > > Try: > > > > background-image: url(../images/rightimage.jpg); > > > No good. Still doesn''t load. > > ---Michael > > > -- > Posted via http://www.ruby-forum.com/.Try sticking the background-image on your body to see if it is really loading or not. There may be another reason it isn''t displaying. _Kevin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Hi Michael, I haven''t followed this back to the original post so forgive me if this has already been covered. Are you able to load other images and only having problems with the background images? Best regards, Bill --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
rightImage.jpg perhaps? Case issues on *nix systems. Vish On 10/25/06, Bill Walton <bill.walton-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:> > > Hi Michael, > > I haven''t followed this back to the original post so forgive me if this > has > already been covered. > > Are you able to load other images and only having problems with the > background images? > > Best regards, > Bill > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Try addeding explicit {height: xxx; width: xxxx} of the image to your style .... On 10/25/06, Vishnu Gopal <g.vishnu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > rightImage.jpg perhaps? Case issues on *nix systems. > > Vish > > On 10/25/06, Bill Walton < bill.walton-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote: > > > > > > Hi Michael, > > > > I haven''t followed this back to the original post so forgive me if this > > has > > already been covered. > > > > Are you able to load other images and only having problems with the > > background images? > > > > Best regards, > > Bill > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---