1. Home
  2. Knowledge Base
  3. Customizations
  4. CSS
  5. How to Align Uploaded Images in the Middle of the Activity Page

How to Align Uploaded Images in the Middle of the Activity Page

Introduction

By default, there is no built-in option to center uploaded images on the activity page. However, you can achieve this by adding a small CSS snippet that aligns activity media to the center for a cleaner and more balanced layout.

Custom Workaround

Follow the steps below to center uploaded images on the activity page:

  1. Go to BuddyBoss > Theme Options
  2. Under Custom Codes, enable CSS
  3. Append the following code:
body.activity .bb-activity-media-elem.media-activity {

    text-align: center;

    display: block;

    flex: auto !important;

}
  1. Click Save changes

This will center uploaded images within activity posts.

Note: Any modifications are considered as custom work already. Know more about our Support policy here: https://buddyboss.com/support-policy/

Troubleshooting and FAQs

Q: The images are still not centered. What should I do?

A: Clear your site and browser cache, then refresh the activity page.

Q: Will this affect other pages or media types?

A: No. This CSS only targets uploaded media within the activity page.

Q: Does this work on mobile devices?

A: Yes. The rule applies across screen sizes unless overridden by additional custom CSS.

Was this article helpful?

Related Articles

Subscribe to Our Newsletter

Stay In Touch

Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss

This field is for validation purposes and should be left unchanged.
This field is hidden when viewing the form

To speak to our Agency consultant, fill in the form found at our Contact Page.