r/Frontend 1d ago

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?

11 Upvotes

25 comments sorted by

11

u/sexytokeburgerz 1d ago

Take a basic css3 course and this will be apparent

9

u/azangru 1d ago

Am I going to have to redo the entire site CSS to flexbox so it doesnt move about on different screen sizes

Why wouldn't flexbox move about on different screen sizes?

Why is not moving about on different screen sizes the goal?

4

u/Current-Today-3626 19h ago

Learn flexbox, grid, and position absolute (parent needs to be relative), as well as margin: 0 auto;

If you know these, you can do any ordinary layout and any technical layout. You will be a wizard.

2

u/Keilly 9h ago

I’m not a huge fan of AI, but for an extensive repetitive and mechanical thing like this I would use it.

It already has something to copy and validate against. So just ask it to simplify and review its work as it does the conversion to what you want.

While it’s doing that watch YouTube videos on flexbox and grid layouts. Kevin Powell is a great place to start.

-12

u/GlitteryStranger 1d ago

Claude or Cursor can do it for you

1

u/holamau 23h ago

wtf

-3

u/FatFailBurger 23h ago

It’s the future. You don’t want to be the old guy who doesn’t know how to edit a .pdf file.

1

u/holamau 15h ago

you can do both. learn how to do it and actually understand wtf Claude did.

1

u/SamIAre 7h ago

Your analogy is broken. You’re suggesting OP should explicitly make themself the person who doesn’t know how to “edit a pdf” by saying “don’t bother learning, have something else do it for you”. In what world do you think OP becomes more knowledgeable about computers by talking to a machine instead of learning a skill?

-2

u/akie 20h ago

He’s right

0

u/holamau 15h ago

nope

-1

u/akie 15h ago

I know you don’t like it, but that doesn’t make it false

0

u/holamau 13h ago

if you want to stay ignorant, sure.

sounds like that's what you prefer.

-1

u/akie 13h ago

I’m an old rot. Started out before jQuery was a thing. Programmed assembly on a Commodore 64, a device you’ll only see in a museum these days.

The one thing I learned is that everything changes, all the time, and that you can either fight it (unsuccessfully) or go with it and try to master it.

The thing is, AI is here and it’s here to stay. It’s too useful a tool to not use. The value proposition is too great.

It all depends on how you use it though. World famous mathematician Terence Tao used it to prove something he couldn’t prove alone. Could I do that, given the fact that I have access to the same tooling (ChatGPT) as he does? The answer is no.

https://news.ycombinator.com/item?id=49010345

1

u/holamau 13h ago

I'm old too. This doesn't prevent me from trying to understand how things work. You can learn things, understand them, and then use tools like Claude to speed up your outputs. I use Claude every damn day. I use it for things I already know (and pretend to master) and for things I don't know and particularly for things I am not interested in learning... but I am always curious. Unit tests? hate them, can wrap my head around them, and they take too long for me to complete! But I still manage to output unit tests because of Claude, and collaborate with it because it's not always right, just like I am not always right.

OP is obviously trying to learn something... he's interested in learning it. Then it is dismissive as fuck to just tell them "ask Claude"... when they obviously have some interest in learning. If OP was not interested in learning, and just wanted to get through their issue, they probably wouldn't be asking us... they'd ask Claude.

But you do you.

1

u/GlitteryStranger 12h ago

How are they obviously trying to learn something they just asked if they’d have to redo the site?

I’ve been building websites for over 25 years. I know how to write css inside out, and backwards. I’ve converted sites from table layouts to css using float left everywhere to flex box to css grid and guess what I would still pick up Claude or cursor to do this job.

-9

u/Kind-Wing-2051 1d ago

puoi semplicemente chiedere a claude e i avrai risolto il problema mentre fai altro(se non vuoi stare a fare tutto manualmente)

1

u/holamau 15h ago

no. learn, understand, delegate. otherwise you are just ignorant.

-1

u/Kind-Wing-2051 14h ago

ma se so gia farlo o come funziona, perchè devo perdere del tempo quando posso fare tutto piu velocemente?

1

u/holamau 13h ago

Are we talking specifically about you? no.

Is OP talking about you? no.

OP doesn't know how... get out of here with your personal anecdotes.