1. Home
  2. Knowledge Base
  3. Customizations
  4. CSS
  5. How to Center Content on Password-Protected Pages

How to Center Content on Password-Protected Pages

Introduction

When you use WordPress’s built-in password protection on posts or pages, the default form may appear left-aligned. A small CSS tweak can center the form for a cleaner, more polished look.

Custom Workaround

  1. Go to BuddyBoss > Theme Options
  2. Under Custom Codes, Enable CSS

Append the following snippet:

form.post-password-form {

  text-align: center;

}
  1. Save Changes

Note: Any modifications are considered “custom work.” Review our Support Policy for details.

Troubleshooting and FAQs

Q: The form is still left-aligned—what now?
A: Clear your site cache, browser cache, and any CDN cache so the new CSS loads.

Q: Does this affect other forms?
A: No. The rule targets only the form.post-password-form selector, leaving other forms untouched..

Q: How do I revert this change?
A: Remove or comment out the CSS from Custom Codes and save your settings.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Support

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

  • Get Started

    Enter your name and email address to get started with your project...

  • This field is for validation purposes and should be left unchanged.

Not recently active