简体   繁体   中英

Why isn't my logo appearing on my partial page in Rails?

I have made a application and the logo appears on every page. All 3 of my layouts are copy and pasted to be identical. I have 2 partials linking to 2 pages in the same view folder and the logo works with one and doesn't with the other. It just displays the "alt" name of the <img> . Is there a way to fix this?

I'd suggest -and I apologise for this- that the obvious answer is that you're not correctly calling the image file.

Check the URI of the image -in the generated (x)html- to make sure that, in the finished page, it's pointing to the correct file. My own issues in these situations tend to be deleting a period ( ../image.png becomes ./image.png ), a typo on the file type ( image.png' as image.pgp` -I don't know why) or some other typo-based issue.

I'm sorry I can't be more technical but those are, in my experience, the most common answers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM