Hello,
Here is a link to my tribute page project in the Responsive Web Design curriculum.
https://codepen.io/EmeraldRaven/pen/poevywJ
Two of the tests failed, and I’m not sure how to fix them. Can someone explain to me what to do?
Hello,
Here is a link to my tribute page project in the Responsive Web Design curriculum.
https://codepen.io/EmeraldRaven/pen/poevywJ
Two of the tests failed, and I’m not sure how to fix them. Can someone explain to me what to do?
You can’t just have CSS in the HTML file like that.
It either needs to be inside a <style>
element in the HTML. Or better yet moved to the CSS code box (without the <style>
element).
Also, your image link is not correct. Use this.
https://upload.wikimedia.org/wikipedia/commons/2/22/AmyLee2003BillboardAwards.jpg
When trying to get the link to an image it is always best to right-click it and use “Open image in new tab”, then copy that URL.
Edit: Forgot to mention. You likely do not want width: 100%
on the image, and you can use auto margin to center it.
Hello,
Can anyone explain how to center an image within its parent element and how to make an element responsively resize without exceeding its original size? I can’t figure out how to do either one.
It sounds like you’re working on the tribute page project. We don’t want to just give you an answer. Some things,
It would also be helpful if you provided a link to your pen.
<div> <img > </div>
div {
align : center}
Always apply align settings on container of image and not on image element. Only then, it will work.
To make an element responsive, use % and such other techniques that you might have learnt while going through the lessons and not the absolute values like px. Revisit lessons. Believe me, this is very important. We forget a lot of details as we go through lessons as fast pace. It’s always good to revisit sections you are having trouble with.
@Keelz96, the HTML code looks the same as the sample project.
Make the project from scratch, with your own code, style and content. Don’t take code from the sample project.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.