Tell us what’s happening:
Hey guy,
can someone please help with my tribute page!
I am finding it bit difficult to center #image within it parent.
I also entered the css properties as well but, i still have four failed.
can someone please review my code and give me a hint
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="styleheet" fref="styles.css">
<title id="title">Tribute Page</title>
</head>
<body>
<main id="main">
<h1 id="title"> Tribute Page</h1>
<figure id="img-div">
<img id="image" src="familyhis.jpg" alt="Family Life" class="center">
<figcaption id="img-caption"> Sweet Family</figcaption>
<label id="img-caption"> Beautiful</label>
<label id="tribute-info"> Family is the best piece in a man life</label>
<a id="tribute-link" traget="_blank" href="https://codepen.io/freeCodeCamp/full/zNqgVx">Early Life in Mexico</a>
</figure>
</main>
</body>
</html>
/* file: styles.css */
img{
display: block;
}
#image{
max-width: 100%;
margin-left: auto;
margin-right: auto;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Tribute Page - Build a Tribute Page