Why is my css width and height not working

In CSS I set an image so its width and height are a certain thing so my image does not go under my text but it does not work even with the !important thing.

Go here and click on woodcutting then inspect Gem Hunt

What do you mean by “so my image does not go under my text”?

The tree should not be like acting as a background and go “behind/under” the tree should move down so the text won’t be ontop of it. As shown.

It is because you are using absolute positioning. I would make the div with class="grass shadow" use display: flex. Then you will need to adjust the text and the time elements to get the alignment you want for them.

I wanted to mimic something like this will it?

The display: flex will help you get there. Again, you will need to adjust other classes/styling to get the centering you want of the elements. To have the text at the top and the items images, you will need to adjust the flex-basis for the items and also need to potentially adjust the height of the overall container.

I applied it It looks still the same and I have no experience in flex.

You can learn about it by building a practice project based on flexbox.

fixed! Now I can do the centering I don’t need your help anymore. All I did was add the flexbox and removed the position absolute.