4,554
edits
No edit summary |
No edit summary |
||
Line 275: | Line 275: | ||
.image-container { | .image-container { | ||
position: relative; | position: relative; | ||
/* Other styling as needed, e.g., setting width and height */ | |||
} | |||
.image-container img { | |||
width: 100%; /* Adjust as needed */ | |||
height: auto; /* Adjust as needed */ | |||
/* Other styling as needed */ | /* Other styling as needed */ | ||
} | } | ||
Line 281: | Line 287: | ||
display: none; | display: none; | ||
position: absolute; | position: absolute; | ||
top: 50%; | top: 50%; /* Center vertically */ | ||
left: | left: 50%; /* Center horizontally */ | ||
transform: translate(-50%, -50%); | transform: translate(-50%, -50%); /* Adjust position to truly center */ | ||
color: white; /* Choose a text color that stands out */ | |||
background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */ | |||
padding: 10px; | |||
} | } | ||
.image-container:hover .caption { | .image-container:hover .caption { | ||
display: block; | display: block; | ||
/* Additional styling | /* Additional styling as needed */ | ||
} | } | ||
.caption-image { | .caption-image { |