v1.9.4 of Paid Memberships Pro introduced a table-free checkout page, improving the usability and display across device types and themes. This new layout placed the form’s input labels on their own line, above the input field.

The recipe below includes the necessary CSS to display these labels inline with the form inputs for large displays only.

Comparing the checkout page with and without the custom CSS for inline labels


The Code Recipe

You can also add this CSS directly into the ‘Additional CSS’ area of your WordPress Customizer. This is accessed via Appearance > Edit CSS in the WordPress Dashboard.

Note: Be sure to remove the <style> </style> tag when pasting this CSS into the “Additional CSS” block.

 


Comments (12)

This works except for the First Name and Last Name fields I have added to checkout using the “Add Name to Checkout Add On”. How would I apply the changes to those fields?

Hi @Chanel,

I have updated the code gist to include the CSS changes to the First Name & Last Name fields when using the “Add Name to Checkout Add-On”, thanks for brining that to my attention 🙂

Please see the updated coding gist from line 30 – 38.

I’m getting an error with this piece of code when I add this either to the css customisation plugin or the Additional CSS in wordpress site.

Please advise if this is still valid css.

@media only screen and (min-width: 1200px) {
#pmpro_form h3 {
display: grid;
grid-template-columns: 2fr 1fr;
}

Hi,

Sometimes when reading the comments, I would appreciate if someone confirms basic questions too. Such as if CSS is still working. I can’t follow the support question of others but still might be interested if at least nothing is wrong per se with a posted CSS code.

Especially if the snippet is small.

Let others be able to follow the answers to interesting CSS questions too. Provide a hint here too.

I know that CSS can be very ‘personal’, still I like to learn something in the comments too.

Leave a Reply

Your email address will not be published. Required fields are marked *