DigiNews

Tech Watch by Johan Denoyer

← Back to articles

we finally learned to center a div, then browsers added sidebars

Quality: 8/10 Relevance: 9/10

Summary

The article discusses modern CSS centering approaches, highlighting how a div can be centered with CSS grid and the complications introduced by browser sidebars in embedded webviews. It shares a JavaScript-based method to compute viewport geometry for accurate centering across browsers, and points to a GitHub project and live demo for center-div.

🚀 Service construit par Johan Denoyer