#
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.
We surface the best developer writing from thousands of independent blogs, updated daily.
Join Diff.blog
TOPICS
Resize any DOM element using two lines of CSS
59
·
Amit Merchant
·
Aug. 18, 2025, 11:02 a.m.
CSS
Web Development
CSS
DOM Manipulation
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
Web Development
CSS
In-N-Out Animation using sibling-index()
Frontendmasters ·
Jul 13, 2026
blog-post
animation
Color Shifting in CSS
joshwcomeau ·
Sep 8, 2025
Web Development
CSS
CSS bar charts—styling data with CSS3 and progressive enhancement
Harry Roberts ·
Feb 2, 2010
Web Development
CSS
Inside HAOQI.DESIGN: Letting DOM and WebGL Share a Retro-Futurist Stage
Tympanus ·
Aug 15, 2026
articles
case study
🎲 Easier striped tables with the 'of [selector]' syntax
Indieblog ·
Aug 15, 2026
Web Development
CSS
Discover more posts →
AUTHOR
RECENT POSTS FROM THE AUTHOR
Choose how you want to continue.
Continue with GitHub
Continue with Google