Sergey's Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Otter@lemmy.ca to Programming@programming.devEnglish · 9 months ago

CSS finally adds vertical centering in 2024

build-your-own.org

external-link
message-square
72
link
fedilink
331
external-link

CSS finally adds vertical centering in 2024

build-your-own.org

Otter@lemmy.ca to Programming@programming.devEnglish · 9 months ago
message-square
72
link
fedilink
CSS finally adds vertical centering in 2024 | Blog | build-your-own.org
build-your-own.org
external-link
CSS finally adds vertical centering in 2024
  • refalo@programming.dev
    link
    fedilink
    arrow-up
    52
    arrow-down
    4
    ·
    9 months ago

    Is it just me or is the irony lost on the author? It says “align-content: center” but it’s only vertically aligned…

    • bitjunkie@lemmy.world
      link
      fedilink
      arrow-up
      18
      ·
      9 months ago

      That’s because under flexbox for horizontal alignment you use a different property called justify-content.

      • refalo@programming.dev
        link
        fedilink
        arrow-up
        4
        arrow-down
        2
        ·
        9 months ago

        Right, which isn’t confusing at all /s

        • bitjunkie@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          9 months ago

          There’s a learning curve but it makes sense once you’ve used it for a bit. I recommend the frog game: https://flexboxfroggy.com/

    • jol@discuss.tchncs.de
      link
      fedilink
      arrow-up
      9
      ·
      9 months ago

      Because we already have a way to center text horizontally…

      • refalo@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        9 months ago

        Yes but my grief was with the naming… why not call it vertical-center? Just “center” is very confusing to me because it does not include horizontal.

        • jol@discuss.tchncs.de
          link
          fedilink
          arrow-up
          2
          ·
          9 months ago

          Because of consistency with the rest of the box model

Programming@programming.dev

programming@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 202 users / day
  • 1.11K users / week
  • 2.97K users / month
  • 7.05K users / 6 months
  • 1 local subscriber
  • 20.1K subscribers
  • 2.2K Posts
  • 34.1K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • MaungaHikoi@lemmy.nz
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org