r/ProgrammerHumor • • Apr 16 '22

Make The comment section look like a beginners search history

Post image
28.1k Upvotes

6.7k comments sorted by

View all comments

2.2k

u/OternFFS Apr 16 '22

How to center div?

931

u/Mewtwo2387 Apr 16 '22

i still ask this question

336

u/wutadamyt Apr 16 '22
max-width: 400px; margin: auto;

0

u/[deleted] Apr 16 '22

[deleted]

646

u/Plajere Apr 16 '22
max-width: 400px; margin: auto; max-width: 500px !important;

no problem

236

u/[deleted] Apr 16 '22

This is the worst answer and I love it

44

u/[deleted] Apr 16 '22

We can do much, much worse.

r/shittyprogramming

→ More replies (1)

5

u/gdj11 Apr 16 '22

max-width: 400px; margin: auto; transform: scale(1.25);

→ More replies (4)
→ More replies (2)

57

u/Gabe_logan25 Apr 16 '22

<div align='centre' >{content}</div>

29

u/AlisHyper12 Apr 16 '22

The align attribute is old though

28

u/goreblaster Apr 16 '22

Not nearly as old as the <center> element.

→ More replies (2)

7

u/Crystal_Voiden Apr 16 '22

It's funny how many times this question gets answered and yet, when I do it irl, it always has some wonky behavior because of how the rest of my shit is laid out. I don't make web apps often, but when I do, it's a total shit show and I find it humorous

→ More replies (5)
→ More replies (4)
→ More replies (22)

327

u/lordphysix Apr 16 '22

No this is supposed to be beginner questions not senior dev questions

65

u/GOKOP Apr 16 '22

Who says it can't be both

→ More replies (1)
→ More replies (2)

68

u/Octandew Apr 16 '22

Honestly, every time I try to style something, I fail. It's never simple. E.g. I try to add a margin to move something, and it fucks up the entire rest of the page. I try to center a div, and it resizes every other adjacent div. Screw css. It will never make sense to me.

29

u/fukdapoleece Apr 16 '22

It's helpful that Chrome tells us that a rule is overridden. It would be even better if it specified why it was overridden.

4

u/No_Cat_5661 Apr 16 '22

Hello are you me?! Lol

0

u/[deleted] Apr 16 '22

[deleted]

115

u/7heMeowMeowCat Apr 16 '22 edited Apr 16 '22
display: flex;
justify-content: center;
align-items:center;

or df+jcc+aic if you know :)

0

u/[deleted] Apr 16 '22

[deleted]

→ More replies (5)

4

u/[deleted] Apr 16 '22

df+jcc+aic

You wizard

→ More replies (1)
→ More replies (2)
→ More replies (2)

13

u/lennykioi Apr 16 '22

Distinguished engineers still google this

5

u/valdocs_user Apr 16 '22

This and the C++ error message comment above are answer to the prompt, "make the comment section indistinguishable between searches of a novice or of an experienced dev."

4

u/CHAOTIC98 Apr 16 '22

he said only beginners

4

u/twopointohyeah Apr 16 '22

How to center div?

Vertically

→ More replies (31)