How do I make my site work on phones, or install like an app?
Start with a viewport tag and flexible CSS for small screens, then add a web app manifest and a service worker so the site installs and works offline.
Making a site work on phones starts with one line in the page's head, the viewport meta tag, which stops phones from shrinking the whole page to fit. Then use layouts that adapt: CSS flexbox and grid, sizes that scale, and media queries, which are rules that apply only at certain screen widths. Make every button big enough for a thumb, and test on a real phone, not just a narrow browser window.
To make the site installable, turn it into a progressive web app (PWA):
- A web app manifest: a small file with the app's name, icons, start page and display mode.
- A service worker: a script that sits between your app and the network. It can save files so the app opens fast and keeps working without a connection.
- HTTPS, which hosts such as Cloudflare set up for you.
AI often gets the caching part wrong, for example by saving an error page or never updating old files, so read its service worker code carefully.
On Vumbli, Modern CSS & UI Design covers layouts that adapt in "Responsive design & media queries". Make It an App: Phone-Ready Web Apps goes from a mobile-first layout to the manifest, service workers and offline support, and ends with you shipping an installable app.
Start with these missions
- Selectors & specificity: which rule wins? (Modern CSS & UI Design)
- The box model & a spacing scale (Modern CSS & UI Design)
- Build a phone app in 60 seconds with AI (Make It an App: Phone-Ready Web Apps)
- Mobile-first layout & the viewport tag (Make It an App: Phone-Ready Web Apps)
Tracks that teach it
More questions, answered by building