---
title: "Day 96: the margin-trim property"
url: https://daily.dev/posts/day-96-the-margin-trim-property-fczns9auw
source_url: https://www.matuzo.at/blog/2023/100daysof-day96
type: article
source: "Manuel Matuzović"
published: 2026-06-22T14:42:11.993Z
updated: 2026-06-22T14:43:10.557Z
tags: ["webdev", "css"]
reading_time: 2
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Day 96: the margin-trim property

**[Manuel Matuzović](https://daily.dev/sources/matuzo)** · 2 min read · 0 upvotes · 0 comments

## Summary

The CSS `margin-trim` property lets a container element trim the margins of its children where they meet the container's edges. This elegantly solves the classic problem of unwanted trailing margin on the last child element — previously handled via `:last-child` overrides, `:not(:last-child)` selectors, or the lobotomized owl selector. The property accepts values like `none`, `block`, `block-start`, `block-end`, `inline`, `inline-start`, and `inline-end`. Currently only supported in Safari Technology Preview.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.matuzo.at/blog/2023/100daysof-day96>

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/day-96-the-margin-trim-property-fczns9auw)
