overflow
property
Specifies what to do when content overflows its block-level container.
Syntax
overflow: visible | hidden | scroll | auto;
Example
css
.card {
height: 200px;
overflow: hidden; /* clip content */
}
.scrollable {
max-height: 300px;
overflow-y: auto; /* scrollbar only when needed */
overflow-x: hidden;
}
/* Text truncation */
.truncate {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}