I don’t get why I’m getting error on these 3.
Your code so far
<!-- file: index.html -->
<main id="main">
<title id="title">Dr. Norman Borlaug</title>
<div id="img-div">
<img id="image"></img>
<div id="img-caption">Dr. Norman Borlaug</h1>
<p id="tribute-info">The man who saved a billion lives</p>
<a id="tribute-link" href="https://en.wikipedia.org/wiki/Norman_Borlaug" target="_blank">
/* file: styles.css */
image{max-width: 100%;
display: block;
text-align: center;
height: auto;}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0
Challenge Information:
Tribute Page - Build a Tribute Page
Your selector for the img
and #image
is not correct.
And you didn’t have margin
property to center the element.
im still getting the error
display: block;
text-align: center;
margin: auto;
height: auto;}
img{display: block;}
Now you need to do this . For center the element you required margin:0 auto;
it still wont take the max-width or the other one i don’t understand why
image{max-width: 100%;
display: block;
text-align: center;
margin:0 auto;
height: auto;}
img{display: block;}
<main id="main">
<title id="title">Dr. Norman Borlaug</title>
<div id="img-div">
<img id="image"></img>
<div id="img-caption">Dr. Norman Borlaug</h1>
<p id="tribute-info">The man who saved a billion lives</p>
<a id="tribute-link" href="https://en.wikipedia.org/wiki/Norman_Borlaug" target="_blank">
</div>
<link rel="stylesheet" href="styles.css">
</main>
You didn’t have src
attribute and value within <img>
element.
1 Like
Your img-caption
div is missing closing tags and also your h1
element didn’t have opening tag.
Your anchor element is missing closing tag.
The link
tag should goes in between head
tags.
system
Closed
11
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.