The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › [Solved] HTML to CSS Image Sizing Issue
Hey Guys, I’m new this forum and to coding. I am building my first website and I ran into an issue.
My header image is not resizing. It’s showing full-size on my page, covering everything. I’m so frustrated that I can’t figure this out. Here is the code below.
` <div id=”header”>
<img src="img/header.jpg" />
CSS (style sheet):
@mrcodes If the image is larger than defined width and height then you’ll have overflow, you can hide this by adding overflow: hidden;.
You may also experiment by making the image flexible, meaning it will resize proportionally to it’s container size. You do this by adding max-width: 100%; to img element.
Thank you very much, Alen. That worked perfectly! And thank you for explaining in a clear away.