question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tooltip Margin Breaks Mobile Layout

See original GitHub issue

I implemented the slider with a tooltip. It seems like the margin on the tooltip is pushing out the overall width of the page, and causing horizontal scrolling on mobile.

When I look at the example (https://refreshless.com/nouislider/slider-options/#section-tooltips) the same margin is applied to the tooltip.

<div class="noUi-tooltip">166.34</div>

Is there a work-around for this? Removing the margin and setting a width seems to be a possible solution, but I’m not sure if there is a proper solution for this.

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
a-fcommented, Feb 1, 2018

Apologies if you have spent time looking into this, I have discovered what the cause of the issue was.

The site that implements noUiSlider uses Wordpress with Angular2, the Angular2 app was importing noUiSlider (11.0.3) but was getting the CSS from the Wordpress part of the site, meaning the CSS that was loaded in was for version 10.1.0.

Once I updated my CSS file to version 11.0.3, I no longer had this issue.

Sorry if I’ve caused any inconvience!

1reaction
ApplicationErrorcommented, Feb 1, 2018

Sorry for the delayed reply. This may have been a caching issue - but a strange one. I had cleared caches, etc, and was still an issue. Then 2 days later, I was working on another issue, the problem disappeared.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS - Align right hand margin to tooltip paragraph that line ...
The width of the text 'descriptions' is greater than the remaining space on right. It can't occupy that space. Hence it goes on...
Read more >
Tooltip size and position on mobile - WordPress.org
When hovering on regions closer to the left/right edge of the screen, the tooltip gets cut off and so the contents can't be...
Read more >
How to Display Tooltips on Mobile Forms - UX Movement
This means the tooltip icon must be as large as it can be without breaking the form layout. An icon that's too small...
Read more >
Tooltips · Bootstrap v5.0
Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-bs-attributes for local title ...
Read more >
What The Heck, z-index?? - Josh W Comeau
margin-left: 20px ; ... .tooltip has a much larger z-index than header ! ... We can map out the stacking contexts being created...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found