Can't change image size in CSS

The below code wouldn’t let me use the ‘image-container’ attribute in CSS to change the image size.

<div id="intro">
        <div class="image-container">
             <img src="./tools.jpg">
         </div>
      <p class="intro-para">Lorem ipsum dolor sit amet</p>
  </div>```

It ended up working when I change it to the below. Why is that??

Lorem ipsum dolor sit amet

```

my post cut me off. this is what i changed it to:

<div id="intro">
      <img class="introimage" src="./tools.jpg">
      <p class="intro-para">Lorem ipsum dolor sit amet</p>
  </div>

Hi, could we see some CSS code? The answer is mostly likely there :wink:

1 Like

oops. thanks @ghostlovescore
this is what it was below when it didn’t work. should i have added the #intro in front of `.image-container’?

.image-container {
   width: 200px;
   margin: auto;
   border: 1px solid darkgreen;
}```