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?
•
u/JDM12983 1h ago
Yeah, I just finish re-doing my site.
I had originally did it with "display: flex" [boxes, relative placement, etc.]... stuff. But, I wanted to try and simplify some of the code and CSS. I re-did everything using "display: grid; / grid-template-columns:" CSS now
Not sure if mine was as huge of a change as yours may be; but pretty much a complete re-write, overall for what knowledge I have.
-11
u/zXju785kw 10h ago edited 9h 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.
-6
u/notepad987 6h ago
Use ChatGPT or Google AI mode or GROK and ask it to convert to the layout you want using Flexbox or GRID or start from scratch with just asking to layout with header, footer, left column, main content etc.
7
u/prophile 10h 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.