JavaScript Treehouse Club - MASH MASH - CSS CSS in Dev Tools

my own logo wont show on the web page

I am trying to add my own logo to this project but for the life of me I can't tell what I am doing wrong.

<h1 class="logo"><img src="img/wwe_belt.jpeg" /></h1>

the image does not show when I refresh the page but I know its probably me because I can change the file name back to the mash and it works. TIA Cheers!

1 Answer

Steven Parker
Steven Parker
182,438 Points

Some things you might check:

  • the file uploaded ok
  • the file name is correct ("wwe_belt.jpeg")
  • the file is located in a sub-directory named "img"

If those all seem good, you might want to make a snapshot of your workspace and provide the link for further analysis.

it was not in the img sub directory, thanks for the help and the tip about snapshot for next time. Cheers!

can you help me adjust the size of the image? also how do i make it centre? check out my snapshot

Steven Parker
Steven Parker
182,438 Points

You can easily adjust the size with some additional CSS:

.logo img { width: 50%; }

You could also just add the width property to the existing ".logo img" rule. If you want a fixed size instead of a relative one you can use a number of pixels (px) instead of a percentage.

Centering should already occur due to the auto margins set by the existing CSS.