Answers for "html image to center"

CSS
13

html center image

/* Here is the CSS code! */
img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
Posted by: Guest on October-17-2020
12

center image css

.centerImg {
  display: block;
  margin: 0 auto;
}
Posted by: Guest on June-01-2020
0

How do i allign a pic centre in html

<img src="Sanjith.jpg" class="centre" height = "200" width = "100">
Posted by: Guest on September-13-2020

Browse Popular Code Answers by Language