#
DIFF.BLOG
New
Following
Discover
Jobs
More
Top Writers
Suggest a blog
Upvotes plugin
Report bug
Contact
About
Sign up
The home for great developer writing.
Discover the best posts from developers and engineering teams, all in one place.
Join now
→
Learn more
TOPICS
Resize any DOM element using two lines of CSS
59
·
Amit Merchant
·
Aug. 18, 2025, 11:02 a.m.
CSS
CSS
DOM Manipulation
Web Development
Frontend Techniques
Summary
The blog post discusses a CSS technique showcased by Kamran Ahmed that allows for resizing any DOM element using only two lines of code, presenting a simple yet clever method that may not be widely known among developers.
Read full post on www.amitmerchant.com →
MORE POSTS LIKE THIS
A Few of The CSS Tidbits I Put in The Site
Jonathan Snook ·
Jul 16, 2026
CSS
Web Development
In-N-Out Animation using sibling-index()
Frontendmasters ·
Jul 13, 2026
blog-post
animation
Color Shifting in CSS
joshwcomeau ·
Sep 8, 2025
CSS
animation
CSS bar charts—styling data with CSS3 and progressive enhancement
Harry Roberts ·
Feb 2, 2010
CSS
Data Visualization
CSS Infinity Use Cases
Nerdy ·
Jul 25, 2026
Blog
CSS
Hyperuplink
mrusme ·
Jul 22, 2026
Web Development
Software Architecture
Discover more posts →
AUTHOR
RECENT POSTS FROM THE AUTHOR
Choose how you want to continue.
Continue with GitHub
Continue with Google