Webdevving

>make a simple website where all content is in one div in the middle
>looks good on pc
>look at mobile
>everything is on the left
>no matter what you do in css, the block is to the left

I'm so fucking angry. Cant even fucking use . I last made a site in like 2010 and it was so much easier, just splurted wherever I wanted it.
No idea what I'm doing wrong, I'm using flexboxing.

Attached: arrayharry.png (417x238, 74.49K)

can't you just use flexbox or something and that should work?

the absolute state of website developement in 2022

CSS fucking filtered me

css is easy as fuck i can make anything look good post code and i'll help

I'm not a webdev, it was just what I would assume to try. What's wrong with it?

For some reason this dont work:



body {
display:flex;
justify-content:center;
}

.mainblock {
width: 68%;
height: fit-content;
text-align:center;
}




REE REE!

So you know nothing about CSS and still whine like a little bitch here? Get off Any Forums retard

You're the one whining because you're coping with this CSS shit. Go on, rot your brain with this. Not even like it's good for anything.

You did nothing wrong, buddy. CSS is shit and that's not your fault.

try width: 100%; on the body

remove all the flex stuff, then margin: 0 auto on .mainblock

again I'm not a webdev, I work on desktop applications, what are you trying to do? Why are you using width: 68%;? And why are you so angry. I just removed the width and now mainblock is in the center.
You placed a flex on the body, then embedded the mainblock inside the body in another flex and gave it a smaller width.

>No idea what I'm doing
We can see that

Just use tables

Attached: 1644990617395.jpg (164x307, 8.73K)

oh oops nevermind, you didn't put flex on mainblock lol I was just assuming.
Either way it's in the center for me and scales.

Basically how I'd do it.

.mainblock {
display:flex;
justify-content:center;
}


:)

But ask /wdg/.

Just add bootstrap col tags to the div or tailwind css

Also add in the head tag initial width scale=1

You realize Firefox's web dev tools has the option to show you what the site looks like on mobile, right???

Use Bootstrap and cols for easy reactive pages.