SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
VeganPizza69 Ⓥ@lemmy.world to Programmer Humor@lemmy.mlEnglish · 3 年前

The Centerer

lemmy.world

message-square
25
link
fedilink
463

The Centerer

lemmy.world

VeganPizza69 Ⓥ@lemmy.world to Programmer Humor@lemmy.mlEnglish · 3 年前
message-square
25
link
fedilink

Art by gfcf14

https://www.facebook.com/webdevtoons

https://twitter.com/webdevtoons

https://www.instagram.com/webdevtoons/

https://www.reddit.com/user/gfcf14/

alert-triangle
You must log in or register to comment.
  • magic_lobster_party@kbin.social
    link
    fedilink
    arrow-up
    72
    ·
    3 年前

    Weird flex, but ok

    • Zucca@sopuli.xyz
      link
      fedilink
      arrow-up
      5
      ·
      3 年前

      Hehe.

      I see what you did there.

    • Andrew@mander.xyz
      link
      fedilink
      arrow-up
      3
      ·
      3 年前

      It’s not weird, it’s powerful!

  • SaintWacko@midwest.social
    link
    fedilink
    English
    arrow-up
    28
    ·
    3 年前

    Hell, I’m a web dev and I’d pay someone to center things for me

    • FredericChopin_@feddit.uk
      link
      fedilink
      English
      arrow-up
      21
      ·
      edit-2
      2 年前

      deleted by creator

      • SaintWacko@midwest.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 年前

        Same! I usually open the dev console and just flip through all the options until I find the one that does it

    • I Cast Fist@programming.dev
      link
      fedilink
      arrow-up
      8
      ·
      3 年前

      <center></center>

      That’ll be 200 dollars

      • Rolando@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        3 年前

        Great, now make it blink.

      • Agentseed@artemis.camp
        link
        fedilink
        arrow-up
        1
        ·
        3 年前

        I still use <center> tags on some things, it’s quick and I’ll fix it when it eventually breaks

    • BusterStatus@kbin.social
      link
      fedilink
      arrow-up
      3
      ·
      3 年前

      For real. When I have a front-end story to do, I basically just slam on the keyboard until it looks close to how UX wants it.

    • gornius@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 年前

      Co-pilot?

  • Bye@lemmy.world
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    1
    ·
    3 年前

    I don’t do web dev, I write math software that makes very rich people richer. But I often hear of this centering and layout crap

    Why doesn’t html just have hcenter and vcenter tags or something? Why is centering so hard?

    • xigoi
      link
      fedilink
      English
      arrow-up
      19
      ·
      3 年前

      HTML has moved on from non-semantic tags a long time ago, and centering is easy with modern CSS.

    • 🇰 🌀 🇱 🇦 🇳 🇦 🇰 🇮 🏆@yiffit.net
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      edit-2
      3 年前

      Since when does HTML not have a simple centering tag?

      Edit: Since HTML5 apparently. Wow wtf?! I haven’t actually used HTML since I was in high school. That’s wild.

    • lorty@lemmygrad.ml
      link
      fedilink
      arrow-up
      2
      ·
      3 年前

      As a frontend dev: who knows?

  • Blackmist@feddit.uk
    link
    fedilink
    English
    arrow-up
    17
    ·
    3 年前

    Centering things on a web page is so easy.

    I also have to look it up every single time.

  • BlackEco@lemmy.blackeco.com
    link
    fedilink
    English
    arrow-up
    10
    ·
    3 年前

    I wasn’t expecting this to work, and yet it does: https://css-tricks.com/the-peculiar-magic-of-flexbox-and-auto-margins/

    When Sam says, “that item will automatically extend its specified margin to occupy the extra space in the flex container,” the way my empty filing cabinet brain interprets that is like so:

    Setting the margin property on a flex child will push the child away from that direction. Set margin-left to auto, the child will push right. Set margin-top to auto and the child will push to the bottom.

    […]

    Why is this useful to know? Well, I think there are a few moments where justify-self or align-self might not get you exactly what you want in a layout where using auto margins gives you that extra flexibility to fine-tune things.

  • sunbytes@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    3 年前

    “We have justify-content and align-items at home”

  • panCatQ@lib.lgbt
    link
    fedilink
    English
    arrow-up
    4
    ·
    3 年前

    I wish i was that good with html/css

  • Bye@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    3 年前

    deleted by creator

    • BlackEco@lemmy.blackeco.com
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      3 年前

      Why doesn’t html just have hcenter and vcenter tags or something?

      HTML is a markup language, its purpose is to structure documents, while CSS can be seen as an additional layer that allows you to style and alter the layout of HTML documents. Because of this philosophy, it wouldn’t make any sense to have such tags.

    • I Cast Fist@programming.dev
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      3 年前

      It actually has <center> for centering things horizontally. Yes, it’s literally <center> content </center>. It’s been around since the early 90s, too. Dunno about a vertical center</center>

      • BlackEco@lemmy.blackeco.com
        link
        fedilink
        arrow-up
        3
        ·
        3 年前

        center is mostly for centering text and is being deprecated in favor of text-align and margin-*: auto https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center

      • Thorned_Rose@kbin.social
        link
        fedilink
        arrow-up
        3
        ·
        3 年前

        Center tag is deprecated in HTML5

    • kameecoding@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      3 年前

      well with the css grid and flexbox it’s no longer a problem.

  • 30isthenew29@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 年前

    Flex.

  • Cork Oak@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 年前

    cool flex bro

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

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: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

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

  • 413 users / day
  • 693 users / week
  • 1.56K users / month
  • 5.94K users / 6 months
  • 450 local subscribers
  • 41.1K subscribers
  • 1.98K Posts
  • 41.2K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org