Search code examples
htmlcssurltumblrbanner

Adding a basic banner to top of tumblr website


I just want to add a basic banner at the top of my tumblr website. The code (posted below) is just below the <body> part of the html, however I can't figure out why any img link that I put into the 'imgurlhere' section only shows up as a broken icon (see picture).

 <a href=“myurlhere”><center><img src=“imgurlhere” width=“500”></center></a>

broken image icon that's showing up

My idea is to upload a short gif to tumblr, and then copy the code into the html so that it is placed at the top of my website as an advertisement. However, every url I put into the 'imgurlhere' section shows up as broken - regardless of advice I've found online stating that's all one needs to do.

  • I'm making sure to include the correct link, such as .png etc
  • And making sure to copy it straight from the 'copy image address'.

Any idea?

Thanks!


Solution

  • I think that setting width="500" in img tag was causing this issue.

    -The best way would be to add a class and then set the width of the image.

    .image{
    width:500px;
    
    }
    <a href=“#”><center><img src="https://images.pexels.com/photos/302804/pexels-photo-302804.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260" class="image"></center></a>

    Try using your image there and let me know if it works or not.Thank You