Making sizing responsive and inherited from container element. HTML CSS & JS
Paultheriault (0)

I am stuck on this last point. Can someone have a look and give me a hint.
1. The <img> element should responsively resize, relative to the width of its parent element, without exceeding its original size.

You are viewing a single comment. View All
Answered by malvoliothegood (147) [earned 5 cycles]
View Answer
malvoliothegood (147)

There are quite a few errors in your CSS file. For example you have misplaced semi-colons main {;. Your HTML tags are messed up as well. Look at this repl. I think it does what you want and I have commented the CSS:

Paultheriault (0)

@malvoliothegood Thanks, I started it over from scratch and cleaned up the erroneous b.s. Now it works like a charm. Thanks again.