DEV Community

Discussion on: CSS - Making child element responsive for its parent.

Collapse
 
pclundaahl profile image
Patrick Charles-Lundaahl

I don't think so. Not without it being extremely hacky. If you find one, I'd be interested in seeing it!

Collapse
 
hamzanouali profile image
Hamza Nouali

For now, media queries are good enough to make things work and responsive 100% for all devices but because I am lazy, I am trying to make my code fit any container in any project without any extra work.
Till now, it looks impossible without JavaScript.

Collapse
 
roroland profile image
Roroland 🎹 💻 - A.k.a. SonicByte

Maybe you can get that behavior with auto fit of css Grid......