Hello,
I am currently in Tribute Page Certification project. I used img element and linked index.html with styles.css. But CSS is not being applied. What is the problem?
You should see either a figure or a div element with an id of img-div
Within the #img-div element, you should see an img element with a corresponding id=“image”
Within the #img-div element, you should see an element with a corresponding id=“img-caption” that contains textual content describing the image shown in #img-div
You should see an element with a corresponding id=“tribute-info”, which contains textual content describing the subject of the tribute page
You should see an a element with a corresponding id=“tribute-link”, which links to an outside site, that contains additional information about the subject of the tribute page. HINT: You must give your element an attribute of target and set it to _blank in order for your link to open in a new tab
You need to to have all the required elements with the required attributes and values.
Thanks everyone for your assistance. Unfortunately, I did not link HTML file with stylesheet. Although I linked before resetting the project and it was not working. But now it is good.
Again, thanks a lot.
You have correctly linked your css with your html. I think css is linked but the styles you are applying on image are not correct.
width:40%;
max-width:60%;
These properties are not used like this. Here, you are saying that the image width is 40% of the body and maximum it can go upto 60% of the body. The point is that if the width is 40% , it never gonna be 60%. So 40% width is always used here. You cannot use relatives values in both properties.
Solution:
You can write something like width is 40% and give max width in px.
Width:40%;
max-width:500px;
Here you are saying that the image is 40% of body but it can only grow upto 500 px of width.