Answers for "how to align a image in css"

CSS
44

css center image

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
Posted by: Guest on November-28-2019
1

center align an image css

<img src="myImg.png" class="center">

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%;
}
Posted by: Guest on January-28-2021
0

Aligning an image in css

.center {
  display: block;
  
  margin-left: auto;
  margin-right: auto;
  
  width: 50%;
}
Posted by: Guest on May-21-2021

Code answers related to "how to align a image in css"

Browse Popular Code Answers by Language