Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions content/css/concepts/overflow/terms/overflow/overflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CatalogContent:
- 'paths/full-stack-engineer-career-path'
---

Defines how a block level element should handle content that goes beyond its boundaries.
Defines how a block-level element should handle content that goes beyond its boundaries. This is shorthand for [`overflow-x`](https://www.codecademy.com/resources/docs/css/overflow/overflow-x) and [`overflow-y`](https://www.codecademy.com/resources/docs/css/overflow/overflow-y).

## Syntax

Expand All @@ -30,11 +30,11 @@ where `<value>` can be one of the following:

## Example 1

Clip any content that overflows without providing a scrollbar to view overflow content.
Any content that overflows will be visible outside of its containing element.

```css
.view-box {
overflow: hidden;
overflow: visible;
}
```

Expand All @@ -50,10 +50,14 @@ Provide a scrollbar and clip any content that overflows.

## Example 3

Provide a scrollbar only if overflow contents exists.
Any Content that overflows will not be visible and no scrollbar will appear.

```css
.view-box {
overflow: auto;
overflow: hidden;
}
```

The following image demonstrates the three `overflow` properties described above:

![Three div elements with overflow properties of visible, scroll, and hidden](https://raw.githubusercontent.com/Codecademy/docs/main/media/css-overflow.png)
Binary file added media/css-overflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.