I'm having trouble getting my background image to display in the specific div I want it in. It works fine when I place it in other elements, like the body element, but for some reason, it's not showing up where I need it to. Any chance you could take a look at my code and help me identify what might be causing the issue? I've already confirmed that the file path and file type are correct, so I'm a bit stumped as to what the problem could be.
HTML:
<body>
<header>
<div class="container container-flex">
<div class="title">
<h1>PRODUCE</h1>
</div>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Groups</a></li>
<li><a href="#">Profiles</a></li>
<li><a href="#">Gallery</a></li>
</ul>
</nav>
</div>
</header>
<div class="container container-flex">
<main role="main">
<div class="image">
</div>
</main>
</div>
</body>
CSS:
body {
margin: 0;
font-size: 1.125rem;
font-weight: 400;
}
.container {
width: 90%;
max-width: 900px;
margin: 0 auto;
}
.container-flex {
display: flex;
flex-direction: column;
justify-content: space-between;
}
header {
padding: 1em 0;
text-align: center;
}
@media (min-width: 675px) {
.container-flex {
flex-direction: row;
}
}
nav ul {
list-style: none;
padding: 0;
display: flex;
justify-content: center;
}
nav li {
margin-left: 2em;
}
nav a {
text-decoration: none;
padding: .25em 0;
font-family: 'Ubuntu', sans-serif;
color: black;
font-size: 1.3rem;
color: #575252;
}
h1 {
font-size: 2.75rem;
margin: 0.1em;
font-family: 'Merriweather', serif;
color: #FF344B;
}
@media (max-width: 675px) {
nav ul {
flex-direction: column;
}
nav li {
margin: .5em 0;
}
}
.image {
background-image: url('logo.jpg');
}