Rafael Auyer Rafael Auyer - 1 year ago 88
HTML Question

Logo image wont show in the navbar (both png and SVG)

I am trying to put a logo on the navigation bar, but I get the alt text instead. This is the section of my navbar:

<a class="navbar-left" href="/"><img alt"IFB AMPDB" src"{% static 'icons/logo_IFB.svg' %}"></a>

(that src is Django Syntax for the files, and it is not the problem. If i repeat it below in the document, it works fine.)

What else I tried:

  • Originally I was going for class="navbar-brand", but changing it wasn't helpful.

  • I have tried linking to other images(even from external links), and still no show. So that wasn't the problem.

  • Have also tried adding the following code, but I only got a bigger Alt text:

    style="display: inline-block; height:38px; margin-top: 5px"



Solution pointed by Drinkin People: there was an equal sign missing in the 'src' tag.

Answer Source

Your missing the equals signs after the src and alt in your image tag.

<a class="navbar-left" href="/"><img alt="IFB AMPDB" src="{% static 'icons/logo_IFB.svg' %}"></a>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download