user1492442
user1492442

Reputation: 239

Prevent scrollbars on tooltip if no overflow?

I created a tooltip, and I have the following CSS. Please note that on Mac, works like a charm but on windows - no luck. Even when the content is not overflowing, the scrollbar tracks show. how can I have my tooltips without them? And if they need them, how can I show only the vertical one.

.tooltip-container {
  font-size: 1.2rem;
  overflow: scroll;
  max-height: 200px;

enter image description here

Upvotes: 0

Views: 1929

Answers (1)

sjm
sjm

Reputation: 5468

Hide the x-axis with overflow-x: hidden, on the y-axis use the 'auto' value which will only show the scrollbar if needed

.tooltip-container {
  font-size: 1.2rem;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 200px;

Upvotes: 1

Related Questions