- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Selectors
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Border Block
- CSS - Border Inline
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursor
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS - Inline Block
- CSS - Dropdowns
- CSS - Visibility
- CSS - Overflow
- CSS - Clearfix
- CSS - Float
- CSS - Arrows
- CSS - Resize
- CSS - Quotes
- CSS - Order
- CSS - Position
- CSS - Hyphens
- CSS - Hover
- CSS - Display
- CSS - Focus
- CSS - Zoom
- CSS - Translate
- CSS - Height
- CSS - Hyphenate Character
- CSS - Width
- CSS - Opacity
- CSS - Z-Index
- CSS - Bottom
- CSS - Navbar
- CSS - Overlay
- CSS - Forms
- CSS - Align
- CSS - Icons
- CSS - Image Gallery
- CSS - Comments
- CSS - Loaders
- CSS - Attr Selectors
- CSS - Combinators
- CSS - Root
- CSS - Box Model
- CSS - Counters
- CSS - Clip
- CSS - Writing Mode
- CSS - Unicode-bidi
- CSS - min-content
- CSS - All
- CSS - Inset
- CSS - Isolation
- CSS - Overscroll
- CSS - Justify Items
- CSS - Justify Self
- CSS - Tab Size
- CSS - Pointer Events
- CSS - Place Content
- CSS - Place Items
- CSS - Place Self
- CSS - Max Block Size
- CSS - Min Block Size
- CSS - Mix Blend Mode
- CSS - Max Inline Size
- CSS - Min Inline Size
- CSS - Offset
- CSS - Accent Color
- CSS - User Select
- CSS Advanced
- CSS - Grid
- CSS - Grid Layout
- CSS - Flexbox
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Paged Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS - Image Sprites
- CSS - Important
- CSS - Data Types
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS - Rounded Corner
- CSS - Border Images
- CSS - Multi Background
- CSS - Color
- CSS - Gradients
- CSS - Box Shadow
- CSS - Box Decoration Break
- CSS - Caret Color
- CSS - Text Shadow
- CSS - Text
- CSS - 2d transform
- CSS - 3d transform
- CSS - Transition
- CSS - Animation
- CSS - Multi columns
- CSS - Box Sizing
- CSS - Tooltips
- CSS - Buttons
- CSS - Pagination
- CSS - Variables
- CSS - Media Queries
- CSS - Functions
- CSS - Math Functions
- CSS - Masking
- CSS - Shapes
- CSS - Style Images
- CSS - Specificity
- CSS - Custom Properties
- CSS Responsive
- CSS RWD - Introduction
- CSS RWD - Viewport
- CSS RWD - Grid View
- CSS RWD - Media Queries
- CSS RWD - Images
- CSS RWD - Videos
- CSS RWD - Frameworks
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
CSS - overflow-block Property
CSS overflow-block property determines how the content of an element behaves when it exceeds the left and right boundaries of its box.
Property overflow-block is supported only on Firefox browser.
Possible Values
-
visible − The content is allowed to overflow the element's box.
-
hidden − The overflow content is hidden.
-
clip − The clip overflow value clips the overflowed content and makes it invisible.
-
scroll − The element is made scrollable by adding a scroll bar.
-
auto − A scroll bar is added to the element so that the user can view its overflow content.
Applies to
All the HTML elements.
DOM Syntax
object.style.overflowBlock = "visible|hidden|clip|scroll|auto";
Property overflow-block is supported only on Firefox browser. Hence all the examples will work only on Firefox browsers.
CSS overflow-block - With visible & hidden Values
The overflow-block property controls whether the content of an element can overflow its boundaries. The visible value allows the content to overflow, while the hidden value hides any overflowing content.
<html> <head> <style> .container { display:flex; } div.overflow-block-visible { background-color: #2fe262; border: 2px solid #000000; width: 170px; height: 160px; overflow-block: visible; margin-right: 100px; } h4 { text-align: center; color: #D90F0F; } div.overflow-block-hidden { background-color: #2fe262; border: 2px solid #000000; width: 170px; height: 160px; overflow-block: hidden; } </style> </head> <body> <div class="container"> <div class="overflow-block-visible"> <h4>Tutorialspoint CSS Overflow-block Visible</h4> Lorem Ipsum is simply dummy text of the printing and typesetting industry. omnis dolor repellendus. non-characteristic words, Temporibus autem quibusdam et </div> <div class="overflow-block-hidden"> <h4>Tutorialspoint CSS Overflow-block Hidden</h4> Lorem Ipsum is simply dummy text of the printing and typesetting industry. omnis dolor repellendus. non-characteristic words, Temporibus autem quibusdam et </div> </div> </body> </html>
CSS overflow-block - clip Value
The overflow-block: clip property hides any overflowing content of an element. No scrollbars are added.
<html> <head> <style> div.overflow-block-clip { background-color: #2fe262; border: 2px solid #000000; width: 170px; height: 160px; overflow-block: clip; } h4 { text-align: center; color: #D90F0F; } </style> </head> <body> <div class="overflow-block-clip"> <h4<Tutorialspoint CSS Overflow-block Clip</h4> Lorem Ipsum is simply dummy text of the printing and typesetting industry. omnis dolor repellendus. non-characteristic words, Temporibus autem quibusdam et </div> </body> </html>
CSS overflow-block - With scroll& auto Values
When the overflow-block property set to scroll and auto.The scroll always adds a scrollbar, while auto only adds a scrollbar when needed.
<html> <head> <style> .container { display:flex; } div.overflow-block-scroll { background-color: #2fe262; border: 2px solid #000000; width: 170px; height: 160px; overflow-block: scroll; margin-right: 100px; } h4 { text-align: center; color: #D90F0F; } div.overflow-block-auto { background-color: #2fe262; border: 2px solid #000000; width: 170px; height: 160px; overflow-block: auto; } </style> </head> <body> <div class="container"> <div class="overflow-block-scroll"> <h4>Tutorialspoint CSS Overflow-block Scroll</h4> Lorem Ipsum is simply dummy text of the printing and typesetting industry. omnis dolor repellendus. non-characteristic words, Temporibus autem quibusdam et </div> <div class="overflow-block-auto"> <h4>Tutorialspoint CSS Overflow-block Auto</h4> Lorem Ipsum is simply dummy text of the printing and typesetting industry. omnis dolor repellendus. non-characteristic words, Temporibus autem quibusdam et </div> </div> </body> </html>