Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button icon alignment #561

Closed
mizejewski opened this issue Sep 13, 2016 · 7 comments
Closed

Button icon alignment #561

mizejewski opened this issue Sep 13, 2016 · 7 comments
Labels
bug Indicates a bug with one or multiple components. status/merged Indicates when a Pull Request has been merged to a Release.
Milestone

Comments

@mizejewski
Copy link

If an icon is added to a button, it should stay aligned with the text. If the button is getting too small, then the line should wrap rather than pushing the icon out of alignment.

button-icon

@arielk arielk added the bug Indicates a bug with one or multiple components. label Sep 14, 2016
@arielk
Copy link
Member

arielk commented Sep 14, 2016

You can fix it with some CSS like this:
.elementor-button-content-wrapper {white-space: nowrap;}

But I think it will cause other problems, so we need some time to figure out how to fix it in the core

@mizejewski
Copy link
Author

Thanks for looking into it.

@Pagester
Copy link

If you move the button text <span into the <span containing the FA icon and remove the display:inline-block from the button text class that will solve your problem.

See code change below, obviously the class names would need to be amended so as to not confuse people,

<span class="elementor-align-icon-left elementor-button-icon"> <i class="fa fa-calendar-check-o"></i> <span class="elementor-button-text">Workshops &amp; special events</span> </span>

and remove from class like below:

.elementor-button .elementor-button-text { /* display: inline-block; */ }

@BradMK
Copy link

BradMK commented May 28, 2017

Has there been any more progress on this? This issue is still present in the current version.

@black-eye
Copy link

+1

@fxaviers
Copy link

More than 2 years and the problem remains. Did the Elementor team give up on this problem?

@fxaviers
Copy link

fxaviers commented Aug 8, 2019

I am organizing the 3 year party of this problem. Come'on, is it so complicated to solve a responsive alignment problem on a button with icon?

I have no idea what risks this can bring to other buttons, but in all projects I use the code below to make it less worse:
.elementor-button .elementor-button-text { display: unset; }
image
image

@arielk @bainternet @shilo-ey Am I asking too much to fix such a known old problem?

KingYes added a commit that referenced this issue Oct 27, 2019
Use css flex to align and order button icon (fixes #561)
@shilo-ey shilo-ey added the status/merged Indicates when a Pull Request has been merged to a Release. label Nov 17, 2019
@shilo-ey shilo-ey added this to the 2.8.0 milestone Nov 17, 2019
@KingYes KingYes closed this as completed in b779fb3 Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates a bug with one or multiple components. status/merged Indicates when a Pull Request has been merged to a Release.
Projects
None yet
Development

No branches or pull requests

7 participants