Troubleshooting HTML image visibility issues

I've been trying to get a Tumblr icon to display in the upper-right corner of my HTML-based page, but all I see when I open it in a browser is a white box with a gray outline. The code I'm using for the image is:

<img style="float: right; margin-left: 10px; margin-bottom: 5px;" scr="tumblr.png" height="30px" width="30px">

It's not an issue with the image file itself since it displays fine on another page of my site. Here's some relevant CSS from my stylesheet:

#header {
    font-family: Raleway, sans-serif;
    background-color:#FFF;
    color: #000;
    position:fixed;
    top:0%;
    width:70%;
    left:12%;
    height:17%;
    padding-left:3%;
    padding-right:3%;
    padding-top:2%;
    padding-bottom:1%;
}

#header_right {
    font-family: Raleway, sans-serif;
    text-align: right;
    float:right;
    vertical-align:middle;
    margin:0;
}

Any suggestions on what might be causing the image not to display correctly?

Answer №1

It's possible that you've moved on from this project by now. But if not, there seems to be a small error in your code.

Currently, it reads: scr="tumblr.png" However, it should say: src="tumblr.png"

If this correction still doesn't resolve the issue, double check that your file paths are accurate. If tumblr.png is located in the same directory as your HTML file, it should work without any problems.

Alternatively, if tumblr.png is saved in an "images" folder, then you would need to specify the path like this: src="images/tumblr.png"

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

smoothly hide the dropdown menu when a link is clicked with a transition effect

I am struggling with two bugs in my dropdown menu that I can't seem to fix. The navigation links on my homepage take users to different sections of the page instantly when clicked. However, the issue arises when the dropdown menu does not close after ...

I'm encountering problems when attempting to display the image/png response from an xmlHTTPRequest. Instead of the correct data, I

I have implemented the following code to integrate a captcha generating web service. The response data is successfully obtained, but when I attempt to display the result within a div element, the image appears as distorted text. var xmlHttp = new XMLHtt ...

Tips for loading a webpage directly to the center instead of the top position

Is there a way to make the page open at a specific div halfway down the page instead of starting from the top? Here is an example: <div id="d1"> <div id="d2"> <div id="d3"> <div id="d4"> <div id="d5"> <div id="d6"> Do ...

Implementing a PHP form for seamless image uploads

I have been attempting to upload a form that includes an image. I have successfully retrieved the data for the brand name and other fields. However, I am encountering an issue with retrieving the image name and type. Can someone please assist me in ident ...

Looking for a resolution with NicEditor - Seeking advice on incorporating custom select options

I recently started using NICInline Editor and found a helpful sample at Is there a way to incorporate custom options into this editor? I would like the selected option's value to be inserted right at the cursor point of the Editor Instance. Query: H ...

SVG padding will only take effect if two or more sides are specified

What is the reason behind an SVG requiring at least 2 areas to be padded for padding to apply? For instance, applying padding-top: 50px to an svg element will have no effect. However, adding padding-top: 50px; padding-left: 1px will result in the padding ...

Unable to change the variable for the quiz

Currently, I am in the process of developing a quiz app and I am facing an issue with my correct variable not updating. Whenever I trigger the function correctTest() by clicking on the radio button that corresponds to the correct answer, it does get execut ...

Tips on how to horizontally align an icon and text using Material UI

As a newcomer to Material UI, I am facing an issue where my icon and text are not aligned: What I'm aiming for: This is the code I have so far: <div style={{ display: 'inline-flex', VerticalAlign: 'text-bottom', Bo ...

What is the method for HTML inline handlers to retrieve the global window object and the variables contained within it?

During my coding test, I encountered an interesting scenario. I had a function called write and used a button with an inline onclick handler to trigger the write() function. function write(text) { alert(text) } <button onclick='write("Some tex ...

How to Use Attributes as Component Parameters in Vue.js

I am currently developing a test Component using Vue.js. I am trying to pass a parameter to be used in my template like this: Vue.component('test', { props: ['href'], template: '<li><a href="{{href}}"><slot> ...

How can I turn off autocomplete in MUI textfields?

Currently, I am working with the latest version of mui. Within my user contact info form, there is a zip code field that I do not want to be auto completed if the value is null. However, despite my efforts, it continues to autocomplete with the email saved ...

A fragmented rendering of a gallery featuring a CSS dropdown menu

Hey there! I'm a newbie coder seeking some assistance. Recently, I stumbled upon a tutorial online that taught me how to create a drop-down menu. However, whenever I hover over "Gallery" on my website, things go haywire and the layout gets all messed ...

The output from the Python and SQLite combination is accurate, however the HTML rendering is not displaying the data correctly

Retrieving data from a database using different methods can yield varied results. When the method is set to 'get', it returns all information, but when it's 'post', it only returns the searched item. Although the post method return ...

What is the solution for resolving scrolling issues when flexbox content is aligned vertically in the center?

One of my goals is to ensure that when the viewport is taller than the content, the content is vertically centered. However, if the viewport is not tall enough and the content overflows, I want the parent element to provide a vertical scrollbar. How can I ...

How can I show a "buffering" message in jPlayer?

I need assistance with jPlayer. Here is the code I am using: $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { title: "Alin", artist: "song", mp3: "utl" ...

Personalizing Web Push Alerts (Google Chrome)

I successfully implemented a web push notification for Google Chrome using Google Project and Service Worker. One thing I'm curious about is how to customize or style the push notification. The plain message box doesn't quite cut it for me – I ...

What is the best way to connect a fresh post to a different URL in ReactJS and Redux?

Currently, I am working with Redux and ReactJS to develop a discussion platform. One of the key features I am trying to implement is where users can input the title and content of their post, which will then be submitted to create a new post. After submit ...

Linking HTML files across different directories

Here is the current structure of my folders: de/ index.html en/ index.html hu/ index.html img/ image.png style/ stylesheet.css I am wondering how I can link to the css file in the style folder and the image in the img folder directly ...

Footer flexbox element not aligning underneath other content containers

After creating a layout using CSS and Flexbox, I encountered an issue with the footer div. When the page loads, the footer is displayed at the bottom of the page. However, as content is added or loaded dynamically, it causes the footer to float in the midd ...

Develop interactive web applications using Typescript

Having difficulty compiling and executing the project correctly in the browser. The "master" branch works fine, but I'm currently working on the "develop" branch. It's a basic web project with one HTML file loading one TS/JS file that includes i ...