King@sh.itjust.works to Programmer Humor@programming.devEnglish · edit-23 days agoCentering a Divi.ibb.coimagemessage-square54fedilinkarrow-up1287arrow-down112file-text
arrow-up1275arrow-down1imageCentering a Divi.ibb.coKing@sh.itjust.works to Programmer Humor@programming.devEnglish · edit-23 days agomessage-square54fedilinkfile-text
minus-squarecbazero@programming.devlinkfedilinkarrow-up22arrow-down5·2 days agoIf you need to be good at a layout language to center something, then maybe the layout language sucks.
minus-squareirelephant [he/him]@programming.devlinkfedilinkarrow-up4·1 day agoYou literally just have to give it a width and add margin: 0 auto;
minus-squarehumorlessrepost@lemmy.worldlinkfedilinkEnglisharrow-up1·edit-22 hours agoI think it’s implied they’re talking about centering both horizontally and vertically. And probably with unknown height. Still easy these days , though.
minus-square𝕱𝖎𝖗𝖊𝖜𝖎𝖙𝖈𝖍@lemmy.worldlinkfedilinkarrow-up1·edit-219 hours agoOr use Flexbox But your solution works as well for simple cases
minus-squareTrickDacy@lemmy.worldlinkfedilinkarrow-up9·2 days agoWhat it says is zero knowledge on the part of the whiner.
If you need to be good at a layout language to center something, then maybe the layout language sucks.
You literally just have to give it a width and add
margin: 0 auto;I think it’s implied they’re talking about centering both horizontally and vertically. And probably with unknown height.
Still easy these days , though.
Or use Flexbox
But your solution works as well for simple cases
What it says is zero knowledge on the part of the whiner.