I've been trying to display an image but it doesn't work. I tried to take off the / at the end of the <img>
tag, but it doesn't work neither. My favicon doesn't appear too, and I don't know why. Here is my code:
img.check { width: 15%; margin-top: 150px; margin-left: 790px; } .text { font-family: 'Roboto', sans-serif; font-size: 20px; margin-top: 150px; margin-left: 625px; } .redirect { font-family: 'Roboto', sans-serif; font-size: 8px; margin-top: 50px; margin-left: 830px; color: blue; } .redirect:hover { color: black; text-decoration: none; }
<!DOCTYPE html> <head> <link href="https://fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet"> <title>Your Password has been changed.</title> <link rel="icon" type="image/png" href="img/zimbrafav.png" /> </head> <body> <img src="img/check.png" class="check" alt="check"> <div class="text"> <p> <h1>Your password has been changed!</h1> </p> </div> <div class="redirect"> <p> <h1><a href="http://google.be/">Go to Google > </a></h1> </p> </div> </body> </html>
Not quite sure but maybe it's because you are working with relative paths instead of absolute.
So
<img src="img/check.png" class="check" alt="check"/>
would turn into
<img src="/img/check.png" class="check" alt="check"/>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.