Ask coding questions

← Back to all posts
How do you change the x and y position of htmls images I forgot how to.
srsly (30)

How do you change the x and y position of images in html?

Answered by Coder100 (16860) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (16860)

use css.

Suppose you have this

<img src="..." class="img">

ur css is:

.img {
  position: absolute;
  left: 5px;
  top: 10px;
}

the left and top are the x and y values technically.