• Advertisement
Sign in to follow this  

Images

This topic is 1268 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an image that i'm using as a header on a website so, i need it to appear on each page. I got the image to appear on the home page. However, when I copy and pasted the code for the image, it doesn't appear on the net page. Is there some rule about using the image twice? is their a better way to go about doing this?

 

<div>
<img src="../IMG/logo.png" alt="Summer Employment Experience logo" width="100%"/>
</div>
 

Share this post


Link to post
Share on other sites
Advertisement

There's no rule about it, if the image is in the right place it should be displayed. Use the tools on your browser to check where is it looking for the image, it looks like a simple problem with the resulting URL that's used to request the actual image. Check the URL of the working image and the the URL of the broken one and you'll found how to fix it.

 

Consider that "../IMG/logo.png" means that the image path is built relative to the html file location, so, if you have your html file at "<path>/src" folder then the image should be in "<path>/IMG" folder, but it could depend on other stuffs too (like the base tag or some stuffs that frameworks might do).

Edited by DiegoSLTS

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement