Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk2 min

Why `overflow: hidden` Seems to Ignore Bottom Padding

`overflow: hidden` clips at the padding edge, so bottom padding cannot create extra space below overflowing content. Use an outer wrapper for visible breathing room.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

overflow: hidden clips content at the element’s padding edge. Bottom padding is inside that clipping boundary, not extra space beyond it, so it cannot reserve a visible buffer after overflowing content. If you need breathing room below clipped content, put the padding on an outer wrapper and clip an inner element.

Why bottom padding does not stop the clipping

CSS overflow is clipped at the padding box (also called the padding edge), as specified by the W3C CSS 2.2 specification. MDN likewise describes hidden content as clipped at the element’s padding box in its overflow reference.

As an Amazon Associate I earn from qualifying purchases.

Padding is part of that box. It does not extend the clipping boundary past the element’s bottom edge. When content exceeds a constrained height, it can therefore look as if the element has ignored its bottom padding: the content is simply being clipped at the box boundary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find the size constraint causing the overflow

Vertical overflow usually becomes visible when an element has a constrained height, max-height, block-size, or max-block-size. Check the element’s computed styles and inspect its box model in browser developer tools. Also check whether a parent, rather than the element itself, is doing the clipping.

#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

box-sizing: border-box makes a declared height or width include padding and border. That can make a fixed-size layout easier to reason about, but it does not move the overflow clipping edge.

Keep visible space below clipped content

Put padding on an outer wrapper

Let the outer element provide the visible breathing room, and apply the height limit and clipping to an inner element:

.card {
  padding-bottom: 1rem;
}

.card__content {
  max-height: 12rem;
  overflow: hidden;
}

Here, the card’s padding sits outside the child’s clipping boundary, so it remains visible below the clipped content.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Change the constrained size or content

If the padding must belong to the same box that clips the content, increase that box’s available height or revise the content and sizing rules. Padding cannot extend the clipping region beyond the padding box.

Rank #3
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose between hidden, clip, and auto

  • hidden clips overflow without displaying scrollbars, but the element remains a scroll container. Clipped content may still be brought into view through focus navigation or script.
  • clip clips overflow without creating a scroll container and disallows programmatic scrolling. Avoid it when users need to reach hidden interactive content.
  • auto provides scrollbars when content overflows, allowing users to access that content.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.