I am not allowed to credit the site that has this disaster. Its owner said “Nobody should see that”

  • Pasta Dental@sh.itjust.works
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    2 months ago

    At least that’s actually easy and quick to do and is the only way of doing it. Centering a div however has 81639393 ways and it seems the one that works is different every time

    • Codex@lemmy.world
      link
      fedilink
      arrow-up
      42
      ·
      2 months ago

      Bro its so easy bro, just use flexboxgridcolumns its been a standard since 2010 just flex it bro you haven’t learned to flex yet just check w3c schools and add a flex you can polyfill it but don’t use that hacked one use the good flexpolyfill then { content-align-middle-child-elements: center-middle-true-neutral } so easy with flex bro

      • drathvedro@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        It’s 2024 and flexboxes still don’t work that well with vertical direction and wraparound…

          • drathvedro@lemm.ee
            link
            fedilink
            arrow-up
            2
            ·
            2 months ago

            Sure. Here you go. The green container should cover all red boxes in both cases. I’ve been bashing my head against this issue for a while, but, as far as I understand, this is a bug that’s never going to be fixed. Which sucks, because I wanted to re-design some of the apps in the horizontal metro-style scrolling manner for the bottom screen on my zephyrus duo, but this effectively prevents me from doing so (Unless I use grids and set positions manually).

            • bleistift2@sopuli.xyz
              link
              fedilink
              English
              arrow-up
              0
              ·
              2 months ago

              That’s interesting. Chrome displays it as you intended, Firefox doesn’t. I guess it’s required that the vertical flex be inline-flex?

              • drathvedro@lemm.ee
                link
                fedilink
                arrow-up
                1
                ·
                2 months ago

                Huh, neat. The last time I looked, chrome was also plagued by this. Might actually re-start some projects I had, but it sucks to have to use chrome.

                inline-flex is indeed necessary since we’re growing left to right and flex would take the entire/fixed width, unless it’s also inside a flexbox.

                • bleistift2@sopuli.xyz
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  2 months ago

                  it sucks to have to use chrome

                  I also hate to admit it, but Chrome currently is the superior browser.

                  • drathvedro@lemm.ee
                    link
                    fedilink
                    arrow-up
                    1
                    ·
                    2 months ago

                    Chromium is a superior engine, yes. But Chrome itself, at least in my eyes, looks to be the least capable browser out of the bunch. I’d rather Vivaldi if I had to switch.

                  • drathvedro@lemm.ee
                    link
                    fedilink
                    arrow-up
                    1
                    ·
                    edit-2
                    2 months ago

                    EDIT: Alright, this is a terrible case because the parent element has flex and therefore no inline-flex is necessary there, but I’d argue it’s the parent element being flex that is redundant, rather than child element being inline.