Home > Mobile >  How do I add a logo to my html website? Only showing a little icon instead of the entire pic
How do I add a logo to my html website? Only showing a little icon instead of the entire pic

Time:10-12

Trying to add the 4 dry out logo to this html template. Can anyone correct what I did wrong? It shows this on the site: 4 dry out logo

This is a very small section of the code where I have the image placed in the body.

<body>
    <!-- Loader -->
    <div id="loader-wrapper">
        <div id="loader"></div>
        <div class="loader-section section-left"></div>
        <div class="loader-section section-right"></div>
    </div>
    
    <!-- Page Content -->
    <div class="container-fluid tm-main">
        <div class="row tm-main-row">

            <!-- Sidebar -->
            <div id="tmSideBar" class="col-xl-3 col-lg-4 col-md-12 col-sm-12 sidebar">

                <button id="tmMainNavToggle" class="menu-icon">&#9776;</button>

                <div class="inner">
                    <nav id="tmMainNav" class="tm-main-nav">
                        <ul>
     <!--ERROR IMG -->      <img data-image="4 Dry Out Logo.jpg" alt="4 Dry Out Logo">
                            <li>

CodePudding user response:

Unless there is other code acting on your img tag, you need to use the src attribute to specify an image URL. Spaces in the image name could also be causing an issue.

You'll want to open up your web browser's developer tools and see if you can see where the image is requested in the network tab. If the URL is returning a 404 error, you know that there is an issue with your image's path. If the request for the image isn't being made at all, then there is an issue with your img tag or the code that is supposed to cause the request for the image to be sent.

CodePudding user response:

    <img data-image="4DryOutLogo.jpg" alt="4 Dry Out Logo">

First you need to consider renaming the image and remove white space from the name.

Second , you have to use the code as below

    <img src = "../yourimagename.jpg">

Finally , You have to make sure that your image exist with in the server path. I suggest you to first open the image via url link , once its open copy paste that url into the src code .

Good luck

  • Related