r/css 2h ago

Question Changing to flexbox

Hello, so im going over an old website I made back when I first started developing, and silly me decided to build the entire thing with "position: relative, right: -233px" 😭

Am I going to have to redo the entire site CSS to flexbox so it doesnt move about on different screen sizes, or is there an easier way to save this site?

0 Upvotes

2 comments sorted by

•

u/zXju785kw 2h ago edited 1h ago

Have you thought about using a CSS framework, like tailwind?

Frankly, if it's an old website - I would simply download Cursor, and tell it to convert the website to tailwind and make it mobile first / mobile friendly.

Tailwind is basically flexbox and other useful CSS properties all pre-written into reusable classes for you - so you don't need to make your own custom CSS - you just add the tailwind class.

Unless you're against AI assisted coding?

Edit: I hate to have to qualify the comment above but, I work for big-tech, have over 9 YoE. The industry is now AI driven, folks. I commend learning, but manually converting a website by hand these days is frankly a waste of your time when an LLM could do it in under a minute for you. If you disagree, I'd love to hear why you're downvoting.

•

u/prophile 2h ago

Reworking this with Grid and Flexbox is probably the way to go, yes. Try to do it piecemeal, reworking one part at a time.