Ask coding questions

← Back to all posts
Lilies
WilliamXing (50)

Why is the Lily Image so big?

Comments
hotnewtop
OldWizard209 (1498)

It is big because that is its default size. To fix it use css, inline or external up to you.
External:

.lily-img {
    width: 200px;
    height: 200px;
}

Internal:

<img src="lily-img" width="300" height="400">
Coder100 (18057)

the image is big by default.
You can set the width and height:

<img width="300" height="400">

just make sure it matches the resolution.

Coder100 (18057)

well yeah you are supposed to change the width and height to your liking! @WilliamXing

ruiwenge2 (481)

you need to set the height or width of the image by adding an attribute. like this:

<img src="https://content.codecademy.com/courses/learn-bootstrap-components/garden-slide1.jpg" class="d-block w-100" alt="butterfly in field" width="300px">