+ 3

how to get an image in the center?

not the center of the whole page just the center acoording to the width.

29th Sep 2020, 4:01 AM
Zihan Sabah
Zihan Sabah - avatar
6 odpowiedzi
+ 20
Hey. Can be done with html (align = "center"). Can be done very easily via css using flex. For the parent of the image, you need to set (width: 100%; display: flex; justify-content: center;).
29th Sep 2020, 4:11 AM
Makar Mikhalchenko
Makar Mikhalchenko - avatar
+ 7
Hye Zihan Sabah Justify the content where you want in right left or in center in css. In html you can do it with <p align="center"/> In html 5 directly you can use center tag. Hope this helps
29th Sep 2020, 4:19 AM
Piyush
Piyush - avatar
+ 4
5 ways to center stuff by css masters. https://code.sololearn.com/WnNWl3XiEd84/?ref=app
29th Sep 2020, 4:21 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 4
It can be done using the (align= "center")
29th Sep 2020, 4:56 AM
Kunal Chaudhari
Kunal Chaudhari - avatar
+ 4
This can be achieved simply by => Display: block; Margin: 0 auto; Width: 100%; Text-align: center;
1st Oct 2020, 12:03 PM
Gido Einstein
Gido Einstein - avatar
+ 2
use this on parent tag css... justify-content:center; display:flex;
29th Sep 2020, 4:14 AM
siddharth
siddharth - avatar