Aligning Elementor button text can be a bit tricky, especially when you’re dealing with long text that doesn’t fit well on mobile screens. This tutorial will show you how to easily align your Elementor button text using a simple CSS addition.
Prerequisites
Please make sure you have the following installed and activated:
Understanding the Problem
When you have a button with long text in Elementor, the text tends to centralize, especially when you switch from desktop to mobile view. This can make your buttons look unprofessional and hard to read.
The Solution: Custom CSS
The solution to this problem is quite straightforward. You’ll need to add a small snippet of custom CSS code to your Elementor button.
Step 1: Navigate to the Elementor Editor
- Open your WordPress dashboard.
- Go to Pages > All Pages.
- Select the page where you want to align the button text.
- Click on “Edit with Elementor.”
Step 2: Select the Button Widget
- Locate the button widget you want to edit.
- Click on it to open the settings panel.
Step 3: Add Custom CSS
- Navigate to the Advanced tab.
- Scroll down to the Custom CSS section.
- Paste the following code snippet:
.elementor-button-text { text-align: left; }
Tip: You can replace
left
withright
if you want the text to align to the right side of the button.
Real-Life Example
Imagine you’re running an online store and you have a button that says “Add to Cart and Checkout.” On mobile screens, the text centralizes, making it look awkward. By applying the above CSS code, you can align the text to the left, making it easier to read and more aesthetically pleasing.
Align Elementor Button Text – Conclusion
Aligning Elementor button text is a simple task that can make a big difference in how professional your website looks, especially on mobile devices. With just a small addition of custom CSS, you can easily achieve this.