0ورڈپریس علامتعمودی طور پر ڈیفالٹ ورڈپریس گیلری میں تصاویر رکھیں

I could­n’t believe a google search did­n’t already turn up the answer for this — it’s crazy that you can­’t just ver­tic­ally-cen­ter the images in a word­press simple image gal­lery. After much faff­ing with سی ایس ایس مجھے ایک آسان سا جواب ملا

By default word­press image gal­lerys are giv­en a class ‘gal­lery’ and all that was needed was to apply some flexbox سی ایس ایس to this gal­lery. For older browsers that don’t sup­port flexbox they will just fall back to the non ver­tic­ally centered gal­lery which isn’t the end of the world.

.گیلری
{
ڈسپلے: فلیکس;
فلیکس بہاؤ: لپیٹنا;
سیدھ کریں: مرکز;
}

اور یہ بات ہے! It works with cap­tions both on and off and does­n’t care how many columns or rows there are in your gallery.

Leave a Reply