Icon not centered on mobile
See original GitHub issueIcon looks centered on desktop but is pushed to the right on mobile (iPhone X)
const ezButton = L.easyButton('<span style="font-size:2em; line-height:26px; color:#FF3D2D;">♥</span>', function (btn, map) {
})
Any ideas how to fix?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
icon inside button not centered in iphone - css - Stack Overflow
I would use this trick to center it horizontally and vertically. (Last example on the page). button { width: 40px; height: 40px; ...
Read more >Horizontal bottom-docked icons are not centered on mobile ...
Horizontal bottom-docked icons are not centered on mobile device ... For some reason, the horizontal bottom-docked share icons are stuck in left-alignment. Is ......
Read more >Icons not centering on Mobile - BB Theme
Hi Elizabeth,. The reason this is happening is that the media query you mentioned above is setting the alignment on devices with a...
Read more >Mobile version isn't centered? : r/elementor - Reddit
It's probably overflow. In the section settings, of the section that's overflowing from its container, you can select overflow: hidden.
Read more >Center align icons in mobile view - Customize with code
When you're on a mobile that has width of less than 350px the icons are bigger than the screen. They are also off...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m probably late to this thread but just had to work through this myself:
This will remove the padding and allow your icon to be centered within the button. There may be a more elegant way of changing the button style when you initially create it. Hope this helps get you on the right track!
https://github.com/CliffCloud/Leaflet.EasyButton/issues/48