How to vertically align to the middle in CSS
HTML-код
- Опубликовано: 27 дек 2024
- Documentation:
phrogz.net/CSS/...
howtocenterincs...
stackoverflow....
Source code can be found here:
code-vault.net...
===== Support us through our store =====
code-vault.net...
===== Check out our website =====
code-vault.net
===== Check out our Discord server =====
discord.code-v...
bruh you really are something else ... thank You G
But `margin: auto` also vertically aligns like you showed in the very beginning, it even centers horizontally too. The only thing you need to keep inside .container is the `display: flex`.
Interesting. That's a great find! I didn't know margin: auto had a different behavior in flexboxes. Horizontally, I would still prefer setting its flex attribute and just using text-align: center for inline element alignment.
@@CodeVault Agreed. I didn't know about that either, I actually thought it would work with just `margin: auto`, but that probably only applies for the parent element.
Yeah, margin: auto usually just sets top and bottom margins to 0. It didn't even cross my mind since it's known for not aligning elements vertically (just horizontally)
Topics to cover: text styling and the tags and implementation of javascript in the html (for example: mouse hover on a text)
Thanks for the ideas! I will look into them
flexbox is a lifesaver i tell you
Thanks a lot 👍👍 you are great
I want to learn c not this you're a god at C why are you starting this . Anyways thank you soo much for the effort you're putting in
I'll upload more C related videos soon
@@CodeVault thank you soo much you have helped me out in C and i would love to watch your videos
@@CodeVault C with GTK
Because at some point you will need to know some web technologies. I remember feeling exactly like you now I want to be able to control my esp32 over the internet. Esp32 programmed in c but connectivity means having to learn Html, css and javascript.
hello dude you do well and you look like macron