I realized that I should have included a bit more information in my previous post, so here''s the revision. 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. The following is the stylesheet code containing the reference to the image. #navigation { width: 180px; height: 484px; background: #7da5a8 url(nav-bg.jpg) no-repeat; } I tried the absolute path to the image above per: background: #7da5a8 url(C:\InstantRails\rails_apps\getdowninthevalley\public\images\nav-bg.jpg) no-repeat; but that didn''t work either This worked fine until I retrofitted the webpages into the Rails framework (which I really like, but which I''m relative new to). If anyone knows the solution, I would really appreciate it ... thanks in advance! Rubio -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
Robby Russell
2009-Apr-15 16:37 UTC
Re: Revision: Background image contained in stylesheet
On Wed, Apr 15, 2009 at 9:32 AM, Rob Blimploid < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I realized that I should have included a bit more information in my > previous post, so here''s the revision. > > 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. > > The following is the stylesheet code containing the reference to the > image. > > #navigation { > width: 180px; > height: 484px; > background: #7da5a8 url(nav-bg.jpg) no-repeat; > } >Your path needs to specify the full relative path. url(/images/nav-bg.jpg) Looks like you''re missing ''images/''> > I tried the absolute path to the image above per: background: #7da5a8 > url(C:\InstantRails\rails_apps\getdowninthevalley\public\images\nav-bg.jpg) > no-repeat; but that didn''t work either > > This worked fine until I retrofitted the webpages into the Rails > framework (which I really like, but which I''m relative new to). > > If anyone knows the solution, I would really appreciate it ... thanks in > advance! > > Rubio > -- > Posted via http://www.ruby-forum.com/. > > > >-- Robby Russell Chief Evangelist, Partner PLANET ARGON, LLC design // development // hosting w/Ruby on Rails http://planetargon.com/ http://robbyonrails.com/ http://twitter.com/planetargon aim: planetargon +1 503 445 2457 +1 877 55 ARGON [toll free] +1 815 642 4068 [fax] --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Rob Blimploid
2009-Apr-15 17:47 UTC
Re: Revision: Background image contained in stylesheet
Robby Russell wrote:> On Wed, Apr 15, 2009 at 9:32 AM, Rob Blimploid < > rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> The following is the stylesheet code containing the reference to the >> image. >> >> #navigation { >> width: 180px; >> height: 484px; >> background: #7da5a8 url(nav-bg.jpg) no-repeat; >> } >> > > Your path needs to specify the full relative path. > > url(/images/nav-bg.jpg) > > Looks like you''re missing ''images/'' > > >> >> Rubio >> -- >> Posted via http://www.ruby-forum.com/.> -- > Robby Russell > Chief Evangelist, Partner > > PLANET ARGON, LLC > design // development // hosting w/Ruby on RailsThanks for the reply .. I changed it to: url(../images/nav-bg.jpg) and it now works beautifully. Thanks for taking the time to address this problem ! -- 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?hl=en -~----------~----~----~----~------~----~------~--~---