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 is Not Positioned in the center of box? #86

Open
kurtvon opened this issue Dec 19, 2018 · 3 comments
Open

Button Icon is Not Positioned in the center of box? #86

kurtvon opened this issue Dec 19, 2018 · 3 comments

Comments

@kurtvon
Copy link

kurtvon commented Dec 19, 2018

There seems to be an issue with my icons position within the box. It's not centered, rather floating near the upper end of the box (The plus Icon). Anyway I could fix this?

L.easyButton('fa-plus', function(){ window.location.href = "https://adkproject.com/submit"; }).addTo(map);

Please note in the image, the lower box is another plugin used to locate gps and not associated with easybutton.

screen shot 2018-12-18 at 9 00 49 pm

@kurtvon kurtvon changed the title Buttion Icon is Not Positioned in the center of box? Button Icon is Not Positioned in the center of box? Dec 19, 2018
@kurtvon
Copy link
Author

kurtvon commented Dec 19, 2018

I may have solved myself after playing around with the CSS code for easy-button.css. I added the following within .leaflet-bar button section.

padding-top:10px;

Seems to center the icon now. Is there a better approach to this?

@h7896v7347
Copy link

Adjust line-height for /
.leaflet-bar i { line-height:30px; }

@khoait
Copy link

khoait commented Jun 17, 2021

in my case:
.leaflet-bar i, .leaflet-bar span { line-height:30px; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants