Hi,
I have a problem with my tribute page. I cannot determine how to fix the error " Your #img-caption
should not be empty." I have searched for similar errors on the forum, but nothing worked for me. I have determined that when I deleted class=“cModal” from the second div element, the error disappears and my tribute page is accepted. I’d like to understand why. Could someone please help me?
I have added extracts of my HTML and CSS codes.
<div id="content">
<section id="Who">
<a href="#p1modal">
<h3>Who?</h3>
<div class="cModal" id="p1modal">
<p>Text <em>text</em>text. </p>
<figure id="img-div">
<img
id="image"
src="https://url"
alt="Aerial view.">
<figcaption id="img-caption">
Text for the figure caption.
</figcaption>
</figure>
</div>
</a>
</section>
</div>
#content {
margin: 2vw 2vw 2vw 2vw;
padding: 1vw 1vw 1vw 1vw;
display: grid;
grid-template-columns: 46vw 46vw;
grid-column-gap: 1vw;
grid-row-gap: 1vw;
grid-template-rows: auto auto;
grid-template-areas:
"Who Dates"
"Famous Famous";
min-height: 50vw;
font-size: 1.5vw;
}
#Who {
grid-area: Who;
height: 45vw;
}
.cModal {
visibility: hidden;
position: relative;
}
.cModal:target {
visibility: visible;
}
.cModal p {
position: relative;
overflow: hidden;
}
#image {
max-width: 100%;
width: 43vw;
display: block;
margin-left: auto;
margin-right: auto;
border-radius: 2%;
}