Scroll vertically if needed
Use to allow vertical scrolling if needed.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eleifend rutrum auctor. Phasellus convallis sagittis augue ut ornare. Vestibulum et gravida lectus, sed ultrices sapien. Nullam aliquet elit dui, vitae hendrerit lectus volutpat eget. In porttitor tincidunt egestas. Pellentesque laoreet ligula at est vulputate facilisis. Etiam tristique justo ut odio placerat ornare. Cras bibendum, orci at ornare tincidunt, lacus nunc gravida enim, sit amet euismod nunc lectus in lectus. Ut dictum nulla et arcu aliquet ornare. Aliquam et dapibus lectus. Aenean mattis elit mi, sed ultricies augue consectetur id. Sed id magna malesuada, luctus urna a, bibendum tortor. Cras cursus cursus ex. Nulla fringilla elit vitae imperdiet scelerisque. Donec ac sem eu diam convallis mollis a sed leo. Proin congue augue turpis, eget rutrum dolor ultricies non. Nulla blandit venenatis dapibus. Sed tincidunt mollis elit, quis suscipit nibh eleifend quis. Donec ex lorem, auctor eu rutrum in, blandit id dolor. Nulla molestie arcu turpis. In id felis vulputate, tempor massa eget, malesuada mauris. Quisque fringilla consequat metus, luctus scelerisque leo fringilla vel.
Responsive
To apply an overflow utility only at a specific breakpoint, add a prefix to the existing class name. For example, adding the class to an element would apply the utility at medium screen sizes and above.
For more information about Tailwind’s responsive design features, check out the Responsive Design documentation.
all
sm
md
lg
xl
QrLmmW69vMQDtCOg48jidqvvWD2FzDt7I7bBoDc98SRP5OwvOScVYbRzFdfp540eF5v1pjogYkyI8NXqu4wY8chgsXIV0LU7XQKWJ98wLaBSHWiBhvkEU1T3sd6KEFo53CLjVjIz8UvZajb8sbsu62xTsF9cRtFdwEvusq6zJHvedymDCUkY6qXHsuL6fOmHo4KKMurZuJZrK3plRPUaI8XVciz8dVq5CEUXjMrTcB76H1w90CnkRER3nYjs3suTa3223xs8aL97m0peQfjlvKbF8HcmQG5mHEitCn1QZnbMZUK3zE9AIjwcVXP7R9V4fw2A93cZD7wj333X6aaiHZdkkTPtst0u05KSob5c0ZuKQi4D3V395NfFKKr8cR27jmpB7dqK2GiWXeOQUFcjmFVwlHWSlH8ZdUoVJpXf1xL6CRUxwZP4EhBbqQZaJm26ijWII6LRxJ5eVU9Y7KKvQsUeX5BawtgeMWRmjeCwQadTLTQG8gLpi2DvGpMtPWCdqHgEglVSB1ZlDrjEEsXYrNx1IOY0053K3pWNaR1ezyz8kahRfNs3byaHcIQu9tWTrcMpBWhZ45DzLjVV1N8Zt96uLnNWK5DvbKW8GgMuwY7fHkZFz85MN4d2gL0j85HmXGx9oPTFRkPWsmMOHUvm5IhB7QqGSAwT1uL7HgBrNX9a1BAWrp9zV1IWAd1q65sKOOCxTZrXJDpxBxYE4rJAGU6pcri9mUf4g49ZiIAwfu9njtZyYimmImCa6TFhk2jQcSmFDHacExxqC2BfYATHFrKSy94dbw6uWT52nM7MSM9JDu4cs9cbfnaf6amt4hTUotCTONg604b8JKPI1sfd4CG36fBNcnErhpllfRlXkY1xFwmwZT7IJV8okPGNQdTKpdPJOBGw3LHMKojPJl1nPiQB5C9bdePFMNLejSXY5DDvO70ehOCJpBtKZY2quoFJJjGfXe8T4DuGYGmM6JYd5DNinWZuUWXGvfIlJRHgf8BQNQvtmEzqGXIeQZitiq9F Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eleifend rutrum auctor. Phasellus convallis sagittis augue ut ornare. Vestibulum et gravida lectus, sed ultrices sapien. Nullam aliquet elit dui, vitae hendrerit lectus volutpat eget. In porttitor tincidunt egestas. Pellentesque laoreet ligula at est vulputate facilisis. Etiam tristique justo ut odio placerat ornare. Cras bibendum, orci at ornare tincidunt, lacus nunc gravida enim, sit amet euismod nunc lectus in lectus. Ut dictum nulla et arcu aliquet ornare. Aliquam et dapibus lectus. Aenean mattis elit mi, sed ultricies augue consectetur id. Sed id magna malesuada, luctus urna a, bibendum tortor. Cras cursus cursus ex. Nulla fringilla elit vitae imperdiet scelerisque. Donec ac sem eu diam convallis mollis a sed leo. Proin congue augue turpis, eget rutrum dolor ultricies non. Nulla blandit venenatis dapibus. Sed tincidunt mollis elit, quis suscipit nibh eleifend quis. Donec ex lorem, auctor eu rutrum in, blandit id dolor. Nulla molestie arcu turpis. In id felis vulputate, tempor massa eget, malesuada mauris. Quisque fringilla consequat metus, luctus scelerisque leo fringilla vel.
Frequently Asked Questions (FAQs)
What is an overflow in CSS?
Overflow is a property of the CSS box model used to control content wrapping in various parts of a web document, such as inside elements with a specified height but is too small to contain all their content.
How do I fix overflowing in CSS?
The text-overflow property does not permit the content of the flex element to shrink below its minimum content size. To fix this, you must set the overflow value to something other than visible. One solution is to override the default CSS with your own styles.
What does overflow do in CSS?
The CSS “overflow” property manages content that doesn’t fit within its container. If the content is too long for a container with a fixed height, like 100 pixels, a scrollbar is added. This allows users to scroll and read the entire content without it being cut off.
What does overflow hidden mean in CSS?
The CSS property “overflow: hidden” hides content that exceeds its container’s size. It clips the overflowing content and makes it invisible without showing scrollbars or enabling scrolling to view the hidden content.
How do you show overflow in CSS?
To show overflow in CSS, apply a specific height or max-height to the block-level element and set the overflow property to “auto” or “scroll.” You can also use “white-space: nowrap” to prevent content wrapping and ensure the overflow is visible within the specified height.
What is overflow overlay in CSS?
The “overflow: overlay” CSS value, although deprecated, allows scrollbars to appear on top of content without taking up additional space. However, this value is non-standard, and the related functionality is being standardized under the “scrollbar-gutter” property.
What causes overflow in CSS?
Overflow in CSS occurs when there is excessive content that cannot fit within a given container or box. It can result from oversized images, lengthy text, or improper sizing and positioning of elements within the layout.
Overflow-x – to remove horizontal scrollbars
This controls the horizontal overflow. Quick note, I also used “white-space: nowrap” here to prevent the line wrapping onto the next line which would be the default behavior. So, a few examples……
overflow-x:visible
Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime.
overflow-x:hidden
Your bones don’t break, mine do. That’s clear. Your cells react to bacteria and viruses differently than mine. You don’t get sick, I do. That’s also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We’re on the same curve, just on opposite ends.
overflow-x:scroll
Well, the way they make shows is, they make one show. That show’s called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they’re going to make more shows. Some pilots get picked and become television programs. Some don’t, become nothing. She starred in one of the ones that became nothing.
overflow-x:auto
Look, just because I don’t be givin’ no man a foot massage don’t make it right for Marsellus to throw Antwone into a glass mother******’ house, ******’ up the way the ****** talks. Mother****** do that **** to me, he better paralyze my ass, ’cause I’ll kill the mother******, know what I’m sayin’?
Scroll horizontally if needed
Use to allow horizontal scrolling if needed.
QrLmmW69vMQDtCOg48jidqvvWD2FzDt7I7bBoDc98SRP5OwvOScVYbRzFdfp540eF5v1pjogYkyI8NXqu4wY8chgsXIV0LU7XQKWJ98wLaBSHWiBhvkEU1T3sd6KEFo53CLjVjIz8UvZajb8sbsu62xTsF9cRtFdwEvusq6zJHvedymDCUkY6qXHsuL6fOmHo4KKMurZuJZrK3plRPUaI8XVciz8dVq5CEUXjMrTcB76H1w90CnkRER3nYjs3suTa3223xs8aL97m0peQfjlvKbF8HcmQG5mHEitCn1QZnbMZUK3zE9AIjwcVXP7R9V4fw2A93cZD7wj333X6aaiHZdkkTPtst0u05KSob5c0ZuKQi4D3V395NfFKKr8cR27jmpB7dqK2GiWXeOQUFcjmFVwlHWSlH8ZdUoVJpXf1xL6CRUxwZP4EhBbqQZaJm26ijWII6LRxJ5eVU9Y7KKvQsUeX5BawtgeMWRmjeCwQadTLTQG8gLpi2DvGpMtPWCdqHgEglVSB1ZlDrjEEsXYrNx1IOY0053K3pWNaR1ezyz8kahRfNs3byaHcIQu9tWTrcMpBWhZ45DzLjVV1N8Zt96uLnNWK5DvbKW8GgMuwY7fHkZFz85MN4d2gL0j85HmXGx9oPTFRkPWsmMOHUvm5IhB7QqGSAwT1uL7HgBrNX9a1BAWrp9zV1IWAd1q65sKOOCxTZrXJDpxBxYE4rJAGU6pcri9mUf4g49ZiIAwfu9njtZyYimmImCa6TFhk2jQcSmFDHacExxqC2BfYATHFrKSy94dbw6uWT52nM7MSM9JDu4cs9cbfnaf6amt4hTUotCTONg604b8JKPI1sfd4CG36fBNcnErhpllfRlXkY1xFwmwZT7IJV8okPGNQdTKpdPJOBGw3LHMKojPJl1nPiQB5C9bdePFMNLejSXY5DDvO70ehOCJpBtKZY2quoFJJjGfXe8T4DuGYGmM6JYd5DNinWZuUWXGvfIlJRHgf8BQNQvtmEzqGXIeQZitiq9F
Browser support
Clip has had support for quite a long time in all browsers except Safari, but support has landed in the Technical Preview for Safari 16, which should be released later this year.
Testing for support
Because is not yet supported in Safari, you’ll want to test for support for it:
As a fallback for the overflowing image and shadow on the Polypane site I’ve deemed it acceptable to add extra padding and a negative margin to make the wrapper element higher, then pulling the next element up over it with the negative margin. Open the Polypane site in Safari to see it for yourself.
Some eagle eyed viewers would be able to see the last bit of the shadow being cut off. For me that’s acceptable in exchange for keeping the rest of the styling manageable: negative margins aren’t a thing I want to use all over the place.
Likewise for your implementation there could be ways to circumvent the need for , or provide a non-perfect but acceptable alternative.
Conclusion
Congratulations on reaching this far! You’re a fantastic reader!!
So in this blog, we discussed CSS overflow in detail, including how we can use the CSS overflow, different values of CSS overflow, browser compatibility, its importance, and finally, responsive testing of our websites using tools like LT Browser.
I hope this blog has given you a thorough understanding of CSS overflow. It’s time to apply CSS overflow to your website like a pro! Again, feel free to refer back to this anytime; it is solely for your use.
Happy styling!
What is an overflow in CSS?
Overflow is a property of the CSS box model used to control content wrapping in various parts of a web document, such as inside elements with a specified height but is too small to contain all their content.
How do I fix overflowing in CSS?
The text-overflow property does not permit the content of the flex element to shrink below its minimum content size. To fix this, you must set the overflow value to something other than visible. One solution is to override the default CSS with your own styles.
What does overflow do in CSS?
The CSS “overflow” property manages content that doesn’t fit within its container. If the content is too long for a container with a fixed height, like 100 pixels, a scrollbar is added. This allows users to scroll and read the entire content without it being cut off.
What does overflow hidden mean in CSS?
The CSS property “overflow: hidden” hides content that exceeds its container’s size. It clips the overflowing content and makes it invisible without showing scrollbars or enabling scrolling to view the hidden content.
How do you show overflow in CSS?
To show overflow in CSS, apply a specific height or max-height to the block-level element and set the overflow property to “auto” or “scroll.” You can also use “white-space: nowrap” to prevent content wrapping and ensure the overflow is visible within the specified height.
What is overflow overlay in CSS?
The “overflow: overlay” CSS value, although deprecated, allows scrollbars to appear on top of content without taking up additional space. However, this value is non-standard, and the related functionality is being standardized under the “scrollbar-gutter” property.
What causes overflow in CSS?
Overflow in CSS occurs when there is excessive content that cannot fit within a given container or box. It can result from oversized images, lengthy text, or improper sizing and positioning of elements within the layout.
Why is overflow a problem?
Overflow can be a problem in CSS when the content exceeds its container’s size. It can lead to unintended layout issues, overlapping elements, or the content being cut off. Managing overflow is important to ensure proper display and user experience, avoiding content being hidden or causing unwanted visual disruptions.
Possible Values
- Specifies that the content should not be clipped. In other words, it should be displayed outside the content box.
- Specifies that the content is clipped (i.e. the parts that extend beyond the content box are hidden), and no scroll bars (or other scrolling mechanism) are supplied.
- Specifies that the content box should provide scroll bars (or other scrolling mechanism) regardless of whether the content is clipped or not.
- Specifies that the content box should provide scroll bars (or other scrolling mechanism) only when the content overflows (i.e. is too big to fit within the content box).
In addition, all CSS properties also accept the following CSS-wide keyword values as the sole component of their property value:
- Represents the value specified as the property’s initial value.
- Represents the computed value of the property on the element’s parent.
- This value acts as either or , depending on whether the property is inherited or not. In other words, it sets all properties to their parent value if they are inheritable or to their initial value if not inheritable.
Основы использования
Отображение содержимого, которое выходит за пределы
Используйте , чтобы предотвратить обрезку содержимого внутри элемента
Обратите внимание, что любое содержимое, выходящее за границы элемента, будет тогда видимым
Andrew Alfred
Technical advisor
Скрытие переполняющегося содержимого
Используйте , чтобы вырезать любое содержимое внутри элемента, выходящее за границы этого элемента.
Andrew Alfred
Technical advisor
Прокрутка при необходимости
Используйте , чтобы добавить полосы прокрутки к элементу в случае, если его содержимое выходит за границы этого элемента. В отличие от , которая всегда показывает полосы прокрутки, эта утилита покажет их только в том случае, если прокрутка необходима.
Andrew Alfred
Technical advisor
Debra Houston
Analyst
Jane White
Director, Marketing
Ray Flint
Technical Advisor
Скролл по горизонтали при необходимости
Используйте , чтобы разрешить горизонтальную прокрутку, если это необходимо.
Andrew
Emily
Whitney
David
Kristin
Sarah
Скролл по вертикали при необходимости
Используйте , чтобы разрешить вертикальную прокрутку, если это необходимо.
Andrew Alfred
Technical advisor
Debra Houston
Analyst
Jane White
Director, Marketing
Ray Flint
Technical Advisor
Скролл по горизонтали всегда
Используйте , чтобы разрешить горизонтальную прокрутку и всегда показывать полосы прокрутки, если операционная система не отключила всегда видимые полосы прокрутки.
Andrew
Emily
Whitney
David
Kristin
Sarah
Скролл по вертикали всегда
Используйте , чтобы разрешить вертикальную прокрутку и всегда показывать полосы прокрутки, если операционная система не отключила всегда видимые полосы прокрутки.
Andrew Alfred
Technical advisor
Debra Houston
Analyst
Jane White
Director, Marketing
Ray Flint
Technical Advisor
Скролл во всех направлениях
Используйте , чтобы добавить полосы прокрутки к элементу. В отличие от overflow-auto, которая показывает полосы прокрутки только в случае необходимости, эта утилита показывает их всегда
Обратите внимание, что некоторые операционные системы (например, macOS) скрывают ненужные полосы прокрутки независимо от этого параметра
Sun
Mon
Tue
Wed
Thu
Fri
Sat
5 AM
6 AM
7 AM
8 AM
9 AM
10 AM
11 AM
12 PM
1 PM
2 PM
3 PM
4 PM
5 PM
6 PM
7 PM
8 PM
5 AM
Flight to vancouver
Toronto YYZ
6 AM
Breakfast
Mel’s Diner
5 PM
Party party
We like to party!
Responsiveness test of a website
A website must be designed to be responsive for a strong online presence. Since responsive websites tend to boost user satisfaction, Google prefers them for SEO. Therefore, responsiveness testingof the website components is crucial.
However, performing tests to check responsiveness can be time-consuming. Moreover, it’s impossible to own devices of all sizes.
There are multiple web development tools that make up a Front-End Developer’s essential toolchain. The usability of these tools allows flexibility while increasing the difficulty in the overall structure. However, there is a need for a tool like LT Browser to help a web developer analyze mistakes and view multiple devices from a real-time view.
LambdaTest’s mobile-friendly test tool, LT Browser, comes with 50+ pre-installed viewports with multiple standard resolutions. Additionally, LT Browser offers sophisticated developer tools for testing.
You can also Subscribe to the LambdaTest YouTube Channel and stay updated with the latest tutorials around automated browser testing, Selenium testing, Cypress E2E testing, CI/CD, and more.
Below are some of the top-notch features of LT Browser that any developer would love to have:
-
Device sync feature to scroll on two devices simultaneously.
-
Network throttling feature to test websites on different network conditions.
-
Capture full-page screenshots of the web page.
-
Generates performance reports powered by Google Lighthouse.
-
Video recording of a running test session, and much more.
Need more reasons to love LT Browser? Here are more reasons why developers should use LT Browser.
A comprehensive end-to-end Testing tutorial that covers what E2E Testing is, its importance, benefits, and how to perform it with real-time examples.
Vendor Prefixes
For maximum browser compatibility many web developers add browser-specific properties by using extensions such as for Safari, Google Chrome, and Opera (newer versions), for Internet Explorer, for Firefox, for older versions of Opera etc. As with any CSS property, if a browser doesn’t support a proprietary extension, it will simply ignore it.
This practice is not recommended by the W3C, however in many cases, the only way you can test a property is to include the CSS extension that is compatible with your browser.
The major browser manufacturers generally strive to adhere to the W3C specifications, and when they support a non-prefixed property, they typically remove the prefixed version. Also, W3C advises vendors to remove their prefixes for properties that reach Candidate Recommendation status.
Many developers use Autoprefixer, which is a postprocessor for CSS. Autoprefixer automatically adds vendor prefixes to your CSS so that you don’t need to. It also removes old, unnecessary prefixes from your CSS.
You can also use Autoprefixer with preprocessors such as Less and Sass.
Visible
Если вы не настроили свойство переполнения, по умолчанию будет . Таким образом, в общем случае нет причин явно устанавливать это значение, если только вы не отменяете его более раннюю установку в другом месте.
На примере ниже выводится , в котором находится текст. У этого div указана высота и сделана синяя рамка, чтобы были видны границы. И хорошо видно, что хотя сам блок заканчивается нижней рамкой, текст идет ниже и выходит за его пределы. Все потому, что по умолчанию видимость при переполнении установлена в – видима.
See the Pen
overflow visible by Андрей (@adlibi)
on CodePen.
Еще интересный момент в том, что даже если контент виден за пределами блока, это вылезающее содержимое не влияет на поток страницы. Например, под блоком с синей рамкой выведен блок с красной рамкой и прозрачным красным фоном. Видно, что текст за пределами первого контейнера не мешает второму контейнеру и тот примыкает вплотную к первому.
See the Pen
overflow flow by Андрей (@adlibi)
on CodePen.
Говоря в целом: не стоит без особой причины устанавливать фиксированную высоту элементов.
CSS Свойства
align-contentalign-itemsalign-selfallanimationanimation-delayanimation-directionanimation-durationanimation-fill-modeanimation-iteration-countanimation-nameanimation-play-stateanimation-timing-functionbackface-visibilitybackgroundbackground-attachmentbackground-blend-modebackground-clipbackground-colorbackground-imagebackground-originbackground-positionbackground-repeatbackground-sizeborderborder-bottomborder-bottom-colorborder-bottom-left-radiusborder-bottom-right-radiusborder-bottom-styleborder-bottom-widthborder-collapseborder-colorborder-imageborder-image-outsetborder-image-repeatborder-image-sliceborder-image-sourceborder-image-widthborder-leftborder-left-colorborder-left-styleborder-left-widthborder-radiusborder-rightborder-right-colorborder-right-styleborder-right-widthborder-spacingborder-styleborder-topborder-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-styleborder-top-widthborder-widthbottombox-decoration-breakbox-shadowbox-sizingcaption-sidecaret-color@charsetclearclipcolorcolumn-countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnscontentcounter-incrementcounter-resetcursordirectiondisplayempty-cellsfilterflexflex-basisflex-directionflex-flowflex-growflex-shrinkflex-wrapfloatfont@font-facefont-familyfont-kerningfont-sizefont-size-adjustfont-stretchfont-stylefont-variantfont-weightgridgrid-areagrid-auto-columnsgrid-auto-flowgrid-auto-rowsgrid-columngrid-column-endgrid-column-gapgrid-column-startgrid-gapgrid-rowgrid-row-endgrid-row-gapgrid-row-startgrid-templategrid-template-areasgrid-template-columnsgrid-template-rowshanging-punctuationheighthyphens@importisolationjustify-content@keyframesleftletter-spacingline-heightlist-stylelist-style-imagelist-style-positionlist-style-typemarginmargin-bottommargin-leftmargin-rightmargin-topmax-heightmax-width@mediamin-heightmin-widthmix-blend-modeobject-fitobject-positionopacityorderoutlineoutline-coloroutline-offsetoutline-styleoutline-widthoverflowoverflow-xoverflow-ypaddingpadding-bottompadding-leftpadding-rightpadding-toppage-break-afterpage-break-beforepage-break-insideperspectiveperspective-originpointer-eventspositionquotesresizerighttab-sizetable-layouttext-aligntext-align-lasttext-decorationtext-decoration-colortext-decoration-linetext-decoration-styletext-indenttext-justifytext-overflowtext-shadowtext-transformtoptransformtransform-origintransform-styletransitiontransition-delaytransition-durationtransition-propertytransition-timing-functionunicode-bidiuser-selectvertical-alignvisibilitywhite-spacewidthword-breakword-spacingword-wrapwriting-modez-index
Настройки скорости скролла
Одним из самых простых способов настройки скорости скролла является использование свойства scroll-behavior. Оно устанавливает, как браузер должен работать со скроллингом, в том числе, скорость прокрутки. Доступные значения: auto (стандартный режим), smooth (плавный режим).
С помощью свойства scroll-snap-type можно настроить привязку к определенным элементам при скролле. К примеру, установив значение mandatory, страница будет прокручиваться таким образом, что каждый элемент, указанный в свойстве scroll-snap-align, будет выровнен в верхней части окна браузера, что в свою очередь позволяет настраивать скорость прокрутки и поведение страницы.
JS-скрипты
С помощью JavaScript также можно достичь настройки скорости скролла. Приведем пример создания плавного скролла с помощью JS:
- Добавить обработчик события click на ссылки
- Получить ID элемента, к которому нужно скроллиться
- Вычислить позицию элемента на странице
- Включить плавный скролл к элементу с помощью анимации
Таким образом, можно настроить так называемый «плавный скролл», достигнув эффекта мягкой прокрутки, что обеспечивает более комфортный интерфейс для пользователя.
Применяя условно
Наведение, фокус и другие состояния
Tailwind позволяет условно применять служебные классы в разных состояниях с помощью модификаторов вариантов. Например, используйте , чтобы применять утилиту только при hover.
Полный список всех доступных модификаторов состояния смотрите в документации Наведение, фокус и другие состояния.
Контрольные точки и медиа-запросы
Вы также можете использовать модификаторы вариантов для таргетинга на медиа-запросы, такие как реагирующие контрольные точки, темный режим, предпочтения с уменьшенным движением и многое другое. Например, используйте , чтобы применить утилиту только на экранах среднего размера и выше.
Чтобы узнать больше, ознакомьтесь с документацией по адаптивному дизайну, темному режиму и .
Conclusion
This article detailed how to CSS overflow-x and its suite of acceptable values. Also, you’ve learned how it works and when you can use it. The following is a summary of what you’ve learned about CSS overflow-x in this article:
- CSS overflow x allows you to show or hide content that overflows a block-level element
- CSS overflow x has six possible values. Most web browsers offer support for five of these values
- CSS overflow-x: scroll will display a scrollbar whether the web browser clips a content or not
- CSS overflow-x: clip forbids all forms of scrolling, including programmatic scrolling
- You can create a text truncation with an ellipsis effect using overflow-x: hidden. Other properties you’ll need are: white-space: nowrap and text-overflow: ellipses
- You can create a scrolling table with overflow-x: scroll
use CSS overflow x