display: flex;
justify-content: center;
align-items: center;
then it casually turns upside down and goes top left
2025-01-10 15:14:25
447
Sani Aliyu :
bro
position: absolute.
top: 50%;
left: 50%;
transform: translate(-50%, -50%)
to make it centered in a parent element just make the parent relative
2025-01-12 11:59:25
8
VR GAMEDEV :
It’s really about MY relationship to the div
2025-01-10 00:03:12
874
Alisa :
I love this community🤣 TikTok please don’t stop taking me here
2025-03-06 04:22:30
0
Manu :
But first, does the div want to be centered?
2025-02-07 02:53:05
14
silky573 :
You don’t center the div, the div centers you.
2025-01-10 01:51:44
294
FJBO :
This is gonna hurt. But problem is that in order to center a div, you have to see the big picture. You can't center a div when your perspective is short. It all starts with those html and body tags.
2025-03-10 04:07:59
0
RB :
It was centered on ie9. I promise
2025-01-10 00:37:19
62
lerok_only :
margin: 0 auto;
2025-01-12 18:15:34
20
𝒿𝓊𝓃𝑒 ┊͙ ˘͈ᵕ˘͈ :
i open the mobile UI and the div is in a different zip code 🤦🏽♀️
2025-02-02 17:05:02
15
guy :
what even does that rectangle do bruv
2025-01-10 22:14:32
0
KIE :
me seconds away from adding the tags around it in a last ditch effort
2025-02-23 20:55:07
0
Shoebox639 :
We just gonna pretend flex box hasn’t been around for like 15 years?
2025-01-10 00:01:13
11
MrDoge :
Maybe the centered div is the friends we made along the way
2025-01-10 00:14:18
141
Pythoness Programmer :
text-align: center; 🤣🤣🤣🤣🤣
2025-01-10 00:04:11
55
qin_shi_huang :
how you know im studying html
2025-01-12 17:08:49
0
Hannah :
Centered EVERYTHING. And somehow it’s upside down now. The div does what the div dove.
2025-02-03 22:10:49
0
こあー (CJ) :
I like my divs a lil crazy.. erratic, maybe.. "centering" my div is like grounding it.. and my div doesn't deserve to be grounded hes a good boy
2025-01-10 02:31:00
63
logicc :
Why is this on my fyp i dont understand any of this
2025-01-18 15:49:17
0
TheVlogTheory :
Lmao ChatGPT helps me 😎🤓
2025-01-10 16:33:55
0
To see more videos from user @alberta.nyc, please go to the Tikwm
homepage.