I am building a portfolio site with react js but the photo I am trying to use is not showing up on the web. I cant seem to find the errors so please help me figure out what I could be doing wrong
Here is the code where the image is contained
import Logo from '../../assets/fts_black.png'
const Header = () => {
return (
<header>
<div className="container header__container">
<div className="me">
<img src={Logo} alt="Logo" />
</header>
)
}
export default Header
This is the css code for the image
.me{
background: var(--color-primary);
width: 22rem;
height: 30rem;
position: absolute;
left: calc(50% - 11rem);
margin-top: 4rem;
border-radius: 12rem 12rem 0 0;
overflow: hidden;
padding: 5rem 1.5rem 1.5rem 1.5rem;
}
The styling is working just fine but the photo just doesnt want to show up. Please help
Thank you for your kind assistance, I realised I made a mistake in the root css in index.css by giving the width of 1005 instead of 100%. I'm sorry for the inconvenience, bye
Are you sure that the path to the img location is correct? I am pretty new with React but the code seems fine.
The Code looks good to me. Ensure the file path is correct and remove the CSS to confirm that it's not hiding the image. Furthermore, checking in inspect elements is a good way to see if the image is there or not.