Back to Tips & Tricks

Elementor Share Buttons Same Width: Fix Uneven Social Buttons

BoostMyCroco TeamPublished on
Row of equal-width teal and green rounded share buttons with network icons, aligned in a neat grid

To make Elementor share buttons the same width, open the Share Buttons widget and change Content > Columns from Auto to the number of buttons you have. Each button then sits in its own column instead of shrinking to fit its label. If you want a centered row that does not fill the full width, keep Columns on Auto and give every button one fixed or minimum width with a few lines of widget-level CSS.

The same idea works for share buttons built from separate Button widgets and for share links on a JetWooBuilder product template.

Why one share button is wider than the others

Elementor Pro's Share Buttons widget has a Columns setting. As Elementor explains in its launch post for the widget, Auto shows the buttons inline, 1 puts each button on its own row, 2 shows them in two columns, and so on.

With Auto, nothing tells the buttons how wide to be, so each one is as wide as its own content: the icon, the label and, if your version shows one, a share count. A label like "LinkedIn" takes more room than a short one, so that button comes out wider. Every button uses the same style. Only the content differs.

JetElements has no share buttons widget (requests for one, such as #2400 and #584, are open suggestions on Crocoblock's GitHub board), so on a Crocoblock site the buttons usually come from Elementor Pro's Share Buttons widget, JetWooBuilder's Single Sharing widget on product templates, or Button widgets placed side by side.

Check which widget you are using

The fix depends on the widget, so check that first:

  1. Open the page or template in Elementor.
  2. Open the Navigator (the panel listing the page's elements).
  3. Find the share row and read the element names:
    • Share Buttons: one widget holds all buttons. Use Fix 1 or Fix 2.
    • Single Sharing inside a Single Product template: JetWooBuilder. See the product page section.
    • A container holding several Button widgets: hand-built. Use Fix 3.

Fix 1: set Columns to the number of buttons

This is the no-code fix and the one to try first.

  1. Select the Share Buttons widget.
  2. In the Content tab, change Columns from Auto to the number of buttons. Four networks, set it to 4.
  3. Open the Style tab, Share Buttons section. Set Columns Gap for the space between buttons and Rows Gap for the space between rows once they wrap.
  4. Set Button Height so every button has the same height as well.
  5. If one label is noticeably longer, lower the font size under Typography so it fits on one line.

The buttons now spread across the available width, each in its own column. To confirm the columns are equal, right-click a button on the front end, choose Inspect, and compare the widths of each button's element. If one long label still makes its column wider, lower the font size further, or add this under the widget's Advanced > Custom CSS so every column can shrink to the same share of the row (a long label may then wrap):

selector .elementor-grid-item {
  min-width: 0;
}

If the element that repeats once per button has a different class in your inspector, use that class instead of .elementor-grid-item.

Set Columns again for tablet and mobile

Four columns that look fine on desktop get cramped on a phone, and long labels start to wrap, which is where buttons often turn uneven again. Look for the device icon next to Columns. If it is there, switch to Tablet and Mobile and pick smaller values, for example 2 on tablet and 2 or 1 on mobile. Then preview each device with the responsive mode switcher.

Fix 2: a fixed or minimum width with CSS

Columns makes the row fill the full width of its parent. For a compact, centered row of equal buttons instead, keep Columns on Auto, set Alignment to center if your version shows it, and give every button one width with CSS.

Class names can change between Elementor Pro versions, so check yours first:

  1. On the front end, right-click one share button and choose Inspect.
  2. Find the element that repeats once per button (often elementor-grid-item).
  3. Inside it, find the button itself, usually with a class like elementor-share-btn.

If your classes differ, replace .elementor-grid-item and .elementor-share-btn in the snippet with yours. Then select the Share Buttons widget, go to Advanced > Custom CSS and paste this. The selector keyword limits the CSS to this one widget:

Code

/* Share Buttons widget > Advanced > Custom CSS (Elementor Pro) */
/* Keep Content > Columns on Auto for this snippet. */
/* If the classes in your inspector differ, replace
   .elementor-grid-item and .elementor-share-btn with yours. */

/* 1. One width for every button */
selector .elementor-grid-item {
  width: 160px;
}

/* 2. Let each button fill its slot and center the icon and label.
   justify-content only has an effect if the button is a flex
   container: check its display value in the inspector. */
selector .elementor-share-btn {
  width: 100%;
  justify-content: center;
}

/* Alternative to step 1: same minimum width, but a long label
   can still grow instead of being cut off. Use one or the other.
selector .elementor-grid-item {
  min-width: 160px;
}
*/

/* 3. Phones: full-width buttons so a fixed-width row cannot overflow */
@media (max-width: 767px) {
  selector .elementor-grid-item {
    width: 100%;
  }
}

How the snippet works and how to test it

The width rule replaces content-based sizing, so every button slot is exactly 160px no matter how long its label is, and the button fills its slot. Change 160px to fit your longest label. The commented min-width version is safer when you are not sure every label fits: short buttons all grow to 160px, and only a label that needs more space gets wider.

If the width rule has no visible effect, check the repeating element's display value in the inspector. Width does not apply to an element displayed as plain inline, so that tells you whether you targeted the right element.

The media query makes each button full width below 768px, so they stack instead of running off a small screen. 767px matches Elementor's default mobile breakpoint; if you changed your breakpoints, use your own mobile value.

To test, click Update, clear your cache or CSS optimization plugin if you use one, and reload the page. Check desktop, then use the device preview to check mobile.

If the icon and label are not centered

If justify-content: center has no visible effect, inspect the button. Check whether its display value is flex (if not, justify-content does nothing), and whether the label wrapper stretches to fill the remaining space. Only if it stretches, add a rule like this below the snippet, using the class you actually see on the label wrapper:

selector .your-label-wrapper-class {
  flex-grow: 0;
}

Without widget Custom CSS

You can also add a class to the widget under Advanced > CSS Classes, for example equal-share, and paste the snippet as global CSS with every selector replaced by .equal-share. Where global CSS goes:

  • Classic themes: Appearance > Customize > Additional CSS.
  • Block themes have no Customizer: open Appearance > Editor > Styles and use Additional CSS there.
  • With Elementor Pro: Elementor's Site Settings > Custom CSS. This is a Pro feature, so on the free version use one of the two options above.

Avoid adding !important everywhere. If a rule does not apply, inspect the button to see which rule wins and make your selector more specific instead.

Fix 3: share buttons built from Button widgets

This fix assumes a Flexbox container holding the classic Button widget. On other setups, such as legacy sections and columns, inspect the buttons and adjust the class names to what you see.

When each network is its own Button widget, every button is again sized by its own text. The fix is to make each Button widget take an equal share of the row and make the button fill its widget.

  1. Select the container that holds the buttons and set its Direction to Row.
  2. Switch to Mobile in the responsive mode and turn on the container's Layout > Wrap option there.
  3. Note the container's Gap value. You need it for the mobile rule below.
  4. Under Advanced > CSS Classes, add equal-share-row.
  5. Paste this as global CSS (see the locations above):
/* Flexbox container with the class equal-share-row */
.equal-share-row .elementor-widget-button.elementor-widget {
  flex: 1 1 0;
  min-width: 0;
}

.equal-share-row .elementor-button {
  width: 100%;
  text-align: center;
}

/* Phones: two buttons per row (needs Wrap on for Mobile).
   10px = half of a 20px gap; use half of your own gap. */
@media (max-width: 767px) {
  .equal-share-row .elementor-widget-button.elementor-widget {
    flex: 1 1 calc(50% - 10px);
  }
}

flex: 1 1 0 starts every Button widget from zero width and splits the row equally, so the label length no longer matters. The extra .elementor-widget class makes the selector a little more specific, so Elementor's own rules for container children are less likely to override it. width: 100% makes the visible button fill its widget. With an odd number of buttons, the last one on mobile stretches to full width; to stop that, change the mobile flex: 1 1 to flex: 0 1. Test it in both a boxed and a full-width container, and inspect one button to confirm the class names.

If your hand-built buttons send a prefilled message, like a WhatsApp share link, see our tip on a WhatsApp button with a custom dynamic message.

Share buttons on JetWooBuilder product pages

JetWooBuilder includes a Single Sharing widget that adds links to share the current product on social networks. If you can't find it in the editor:

  1. Open JetWooBuilder's widget settings under the Crocoblock menu in the WordPress dashboard (Crocoblock > JetPlugins Settings > JetWooBuilder > Widgets; the labels can differ slightly by version). Make sure Single Sharing is enabled in the Single Product Widgets group.
  2. Open a Single Product template in Elementor. Single-product widgets only appear in the panel while you edit that template type.

The simplest way to get equal widths on a product page is to place Elementor Pro's Share Buttons widget on the Single Product template instead and use Fix 1. If you keep Single Sharing, view a product on the front end and inspect the share row. Note two classes: the element that repeats once per button, and the clickable button or link inside it. Add a class such as equal-share to the widget, then reuse the Fix 2 snippet as global CSS: put .equal-share in place of selector, the repeating class in place of .elementor-grid-item, and the inner button class in place of .elementor-share-btn. Keep the mobile media query.

Checklist when the widths still don't match

  • Columns is still on Auto for one device. Check the device icon next to the setting and the tablet and mobile values.
  • One item has a long Custom Label. Custom Label is set per button, so one long label makes one wide button. Shorten it, or use the minimum-width CSS.
  • A share count adds width. If your version has a share counter option and it is on, turn it off, or rely on a fixed width.
  • Labels don't show the same way everywhere. If you hide labels (a Label show/hide switch or an icon-only View, depending on your version), make sure that applies to all buttons, then preview each device.
  • A long label wraps to two lines on smaller screens. Lower the font size, increase the width, or use fewer columns on that device.
  • Changes don't show on the live site. Clear your cache or CSS optimization plugin, then reload.

In most cases Fix 1 is all you need: set Columns to a number for each device and confirm the widths in the inspector. Use the CSS for a compact row of fixed-width buttons, and the flex rules when the buttons are separate widgets. If you'd rather have the share row designed and built for you, post a request on BoostMyCroco.

Frequently Asked Questions

Why is one Elementor share button wider than the others?
When the Share Buttons widget has Columns set to Auto, each button is sized by its own icon and label, plus a share count if your version shows one. A network with a longer label, such as LinkedIn, ends up wider than one with a short label. Set Columns to a number or give the buttons a fixed width with CSS and the difference disappears.
Does Crocoblock have a share buttons widget?
JetElements has no share buttons widget. On Crocoblock's suggestions board on GitHub, #2400 asks for share buttons in JetElements, and #584 is an open suggestion asking for a social media sharing function in Crocoblock's plugins. JetWooBuilder does include a Single Sharing widget, but it is meant for single WooCommerce product templates, so for other pages use Elementor Pro's Share Buttons widget or build the buttons from Button widgets.
Will icon-only share buttons all be the same size?
Hiding the label removes the part that usually makes the widths differ. Depending on your version, that is a Label show/hide switch or an icon-only View option. The buttons are then sized mainly by the icon and the Button Size setting, but if your version has a share counter option and it is on, widths can still vary, so turn it off or add the fixed-width CSS.
Where do I put CSS for hand-built Button widgets if there is no widget Custom CSS?
Add a class to the container under Advanced > CSS Classes and paste the CSS as global CSS: Appearance > Customize > Additional CSS on classic themes, or Additional CSS in Appearance > Editor > Styles on block themes. With Elementor Pro you can also use Site Settings > Custom CSS. Write the class name in your selectors instead of the selector keyword, which only works in a widget's own Custom CSS field.
Will this CSS stop working after an Elementor update?
The snippet relies on the class names Elementor outputs, and those can change between versions. If the buttons turn uneven after an update, inspect one button again and replace the class names in your CSS with the ones you see.

This guide answers a question from our community: how do I

Sources

  1. Share Buttons widget (elementor.com)
  2. Add Share Buttons to WordPress with Elementor Share Buttons (elementor.com)
  3. add share buttons · Issue #2400 · Crocoblock/suggestions · GitHub (github.com)
  4. social media sharing function · Issue #584 · Crocoblock/suggestions · GitHub (github.com)
  5. Single Sharing Widget for Elementor (crocoblock.com)

Related tips