Apu
July 31, 2022 .
#Css Tutorial
.
#property
❌
CSS overflow property
The overflow property specifies what should happen if an element's content is too big to fit in a specified element.
Overflow property has multiple values. For example,
Overflow Value:-
overflow: visible|auto|hidden|scroll
- overflow:visible; This is the default value for overflow property. If the content is big to fit in the element, it renders the content outside the element's box. Meaning that the text or element is not clipped.
overflow:visibleThis is a child element.Lorem ipsum dolor amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. - overflow:auto; is used to add a scrollbar whenever a box's content is too large to fit the content in the box (element).
overflow autoThis is a child element.Lorem ipsum dolor amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
- The overflow:hidden; property is used to prevent scrollbars from showing up, even when they're necessary.
overflow hiddenThis is a child element.Lorem ipsum dolor amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
- overflow:scroll; This is similar to auto value. This will add a scrollbar both horizontally and vertically.
overflow:scrollThis is a child element.Lorem ipsum dolor amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
- overflow-x:auto; is used for adding a horizontal scrollbar whenever it's needed or required.
- overflow-x:hidden; prevents to add horizontal scrollbar even when it's required.
- overflow-y:auto; is used for adding a vertical scrollbar.
- overflow-y:hidden; is used to prevent vertical scrollbar from showing up.
The auto value is similar to scroll . But it adds scrollbars only whenever it's necessary.
The overflow property only works for the block elements with a specified height.
save
listen
AI Answer
CSS overflow property
0
The overflow property specifies what should happen if an element's content is too big…
asked
Apu
0 answers
2915
The overflow property specifies what should happen if an element's content is too big…
Answer Link
answered
Apu