Hi there, A little problem has come up in my application. I want a logo to be displayed right at the top of my main page, and it is not working. Instead, it gives me an image thumbnail which shows that the image is at the right place but not displayed. If somebody could help. Thanks. -- Posted via http://www.ruby-forum.com/.
Guest wrote:> Hi there, > A little problem has come up in my application. > I want a logo to be displayed right at the top of my main page, and it > is not working. > Instead, it gives me an image thumbnail which shows that the image is at > the right place but not displayed. > If somebody could help. > Thanks.When asking questions you please give context and a more details. In it''s current form your question is not really answerable. What is your code that includes the image, and are you using the image_tag helper? What html is generated that doesn''t work? Please clarify what this means: "Instead, it gives me an image thumbnail which shows that the image is at the right place but not displayed." Is it a broken image icon? -- Posted via http://www.ruby-forum.com/.
Alex Wayne wrote:> Guest wrote: >> Hi there, >> A little problem has come up in my application. >> I want a logo to be displayed right at the top of my main page, and it >> is not working. >> Instead, it gives me an image thumbnail which shows that the image is at >> the right place but not displayed. >> If somebody could help. >> Thanks. > > When asking questions you please give context and a more details. In > it''s current form your question is not really answerable. > > What is your code that includes the image, and are you using the > image_tag helper? What html is generated that doesn''t work? > > Please clarify what this means: "Instead, it gives me an image thumbnail > which shows that the image is at the right place but not displayed." > > Is it a broken image icon?Hie Alex, Thanks for your reply and at the same time I am sorry for not making it clear. My HTML code says : <img src="xyz.jpg" width="200" height="50"> And instead of displaying the image it gives me an icon which appears just before the image is uploaded.. I am sorry but I don''t know what is it called! :( -- Posted via http://www.ruby-forum.com/.
Hi, On 24 Apr 2006, at 10:33, Guest wrote:> My HTML code says : > <img src="xyz.jpg" width="200" height="50">What directory in your filesystem contains the image? If the image is in $RAILS_ROOT/public/images, your img tag should be <img src="/images/xyz.jpg" width="200" height="50"> Even if you''ve put your image in $RAILS_ROOT/public, you''d still need to sling a "/" in there, to make it look like this: <img src="/xyz.jpg" width="200" height="50"> This is because if you were browsing to /controller/application/ action, your browser would request the image as /controller/ application/xyz.jpg, which wouldn''t work. Also you could try image_tag, as suggested by Alex. In this case it would be: <%= image_tag("xyz.jpg", :size => "200x50") %> Jon
Jon Evans wrote:> Hi, > > On 24 Apr 2006, at 10:33, Guest wrote: > >> My HTML code says : >> <img src="xyz.jpg" width="200" height="50"> > > What directory in your filesystem contains the image? If the image > is in $RAILS_ROOT/public/images, your img tag should be > > <img src="/images/xyz.jpg" width="200" height="50"> > > Even if you''ve put your image in $RAILS_ROOT/public, you''d still need > to sling a "/" in there, to make it look like this: > > <img src="/xyz.jpg" width="200" height="50"> > > This is because if you were browsing to /controller/application/ > action, your browser would request the image as /controller/ > application/xyz.jpg, which wouldn''t work. > > Also you could try image_tag, as suggested by Alex. In this case it > would be: > <%= image_tag("xyz.jpg", :size => "200x50") %> > > JonHey guys!!! You are too good. It worked... The image_tag worked. Thanks a ton. :) -- Posted via http://www.ruby-forum.com/.