How to vertically align to the middle in CSS

Поділитися
Вставка
  • Опубліковано 29 вер 2024

КОМЕНТАРІ • 15

  • @justfun8143
    @justfun8143 Рік тому

    Topics to cover: text styling and the tags and implementation of javascript in the html (for example: mouse hover on a text)

    • @CodeVault
      @CodeVault  Рік тому

      Thanks for the ideas! I will look into them

  • @ianthehunter3532
    @ianthehunter3532 Рік тому +2

    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`.

    • @CodeVault
      @CodeVault  Рік тому +3

      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.

    • @ianthehunter3532
      @ianthehunter3532 Рік тому +1

      ​@@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.

    • @CodeVault
      @CodeVault  Рік тому +1

      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)

  • @fluffyweird
    @fluffyweird Рік тому +1

    bruh you really are something else ... thank You G

  • @Yavuzsultanselim1071
    @Yavuzsultanselim1071 Рік тому

    hello dude you do well and you look like macron

  • @HasinthaWeragala
    @HasinthaWeragala 11 місяців тому

    flexbox is a lifesaver i tell you

  • @swajju
    @swajju Рік тому

    Thanks a lot 👍👍 you are great

  • @pradnyeshmate1317
    @pradnyeshmate1317 Рік тому

    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

    • @CodeVault
      @CodeVault  Рік тому +1

      I'll upload more C related videos soon

    • @pradnyeshmate1317
      @pradnyeshmate1317 Рік тому

      @@CodeVault thank you soo much you have helped me out in C and i would love to watch your videos

    • @Quasarsoft
      @Quasarsoft Рік тому

      @@CodeVault C with GTK

    • @noweare1
      @noweare1 7 місяців тому

      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.