আমি বিশ্বাস করতে পারিনি যে একটি গুগল অনুসন্ধান ইতিমধ্যেই এর জন্য উত্তর দেয়নি - এটি পাগল যে আপনি একটি ওয়ার্ডপ্রেস সাধারণ চিত্র গ্যালারিতে চিত্রগুলিকে উল্লম্বভাবে কেন্দ্র করতে পারবেন না. সাথে অনেক ফাজলামি করার পর সিএসএস আমি একটি সহজ উত্তর খুঁজে পেয়েছি
By default wordpress image gallerys are given a class ‘gallery’ and all that was needed was to apply some flexbox সিএসএস to this gallery. For older browsers that don’t support flexbox they will just fall back to the non vertically centered gallery which isn’t the end of the world.
1 2 3 4 5 6 | .gallery { display: flex; flex-flow: wrap; align-items: center; } |
এবং এটাই! It works with captions both on and off and doesn’t care how many columns or rows there are in your gallery.
মনে করি আমরা কিছু মিস করেছি? আমাদের নীচের মন্তব্য করে জানতে দিন. আপনি সদস্যতা করতে চান তাহলে উপরের ডানদিকের মেনু এর লিঙ্কে সাবস্ক্রাইব ব্যবহার করুন. এছাড়াও আপনি নীচের সামাজিক লিঙ্ক ব্যবহার করে আপনার বন্ধুদের সাথে ভাগ করতে পারেন. চিয়ার্স.
উত্তর দিন