📢
15
c/coding-for-beginners•faithb78faithb78•3mo ago

TIL why my first website looked so bad on my phone...

I was showing my sister the site I built on my laptop at a coffee shop, and she pulled it up on her phone and said 'it's all broken'... I had no idea you had to write special code to make things look right on different screens. How do you even start learning that?
3 comments

Log in to join the discussion

Log In
3 Comments
the_daniel
the_daniel3mo ago
Wait you built a whole site without knowing about responsive design? That's wild. Just look up CSS media queries, that's the basic fix.
6
elliot_lee
elliot_lee3mo ago
Ever think some sites just work better with a mobile version instead?
5
jana_henderson52
jana_henderson522mo agoMost Upvoted
Honestly, the hardest part is learning to think in percentages instead of fixed pixels. That old site probably had a layout set to 1200 pixels wide, which just shoves off the side of a phone screen. Start by making all your container widths a percentage, like 90% instead of 1200px. Then images need max-width: 100% so they shrink. Media queries come next, but switching that fixed mindset is the real first step.
6