Tell us what’s happening:
Describe your issue in detail here.
How to center the image with parent element?
Your code so far
<!-- file: index.html -->
<main id="main">
<h1 class="Ana Huang's series">Ana Huang's Series</h1>
<title id="title">Love</title>
<div id="img-div"><img id="image" ></img>
<div id="img-caption">Twisted Series is awesome</div>
<div id="tribute-info">Ava Chen, Alex Volkov of the twisted love.</div>
<a id="tribute-link" href="amazing" value="fun" target="_blank"></a>
<div class="center">
<img width="400" src="https://www.hubspot.com/hubfs/image-hubspot-centering-css.jpeg">
<link rel="stylesheet" href="styles.css">
</main>
/* file: styles.css */
img{
display: block
}
img{
max-width: 100%
}
.love{
height: 30px;
display: block
}
.center{display:flex;align-items:center;justify-content:center;height:500px;}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Challenge: Tribute Page - Build a Tribute Page
Link to the challenge: