skip to Main Content

I have added an image in the header section as a logo.But the image is not showing.However the code is working for my online course instructor.I have tried various images and links but in vain.

I have given the link of my github repository of the codes I used:
https://github.com/Ashikf1/web-des-ign

Though I see nothing wrong with the code still it isn’t working.I would be grateful if anyone can help me out.

2

Answers


  1. The issue is with the image path. As the image logo.png exists in img folder which is one level above the current css

    try this

    #logo-img {
        background: url('../img/logo.png') no-repeat;
        width: 150px;
        height: 150px;
        margin: 10px 15px 10px 0;
    }
    
    Login or Signup to reply.
  2. For images, use the image tag with src attribute:

    <image src="./img/logo.png" id="logo-img" alt="Logo image">
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search