CSS Gardening

584 points · 20 comments · view on lemmy.world

20 Comments

shovingleopardnsfw@lemmynsfw.com · 32 pts · 1y (4 replies)

Sadly

position: top;

is not valid css. It should say

position: absolute;
bottom: 0px;

Still funny though.

shovingleopardnsfw@lemmynsfw.com · 17 pts · 1y (1 reply)

Ah, the author fixed it. Good job.

hemmes@lemmy.world · 2 pts · 1y

Thank God, that would’ve eaten me alive

some_guy@lemmy.sdf.org · 4 pts · 1y

You design people and your pedantry. > /dev/null for you.

Jk, you're fine.

anguo@piefed.ca · 1 pts · 1y

The px is making me eyes itch.

Michal@programming.dev · 20 pts · 1y

If you trim that bush, it'll seem larger

who@feddit.org · 19 pts · 1y (1 reply)
some_guy@lemmy.sdf.org · 6 pts · 1y

Came to say the same. I've never taken it so literally.

yetAnotherUser@lemmy.ca · 8 pts · 1y (3 replies)

Why is .tree's position relative?

bleistift2@sopuli.xyz · 30 pts · 1y (1 reply)

Needed for the .leaves’ absolute positioning to be relative to the tree, and not relative to the universe.

hemmes@lemmy.world · 10 pts · 1y

Damn, I thought you were going to take me out to dinner first

BleakBluets@lemmy.world · 6 pts · 1y

It's so the position: absolute for .leaves works relative to .tree. The implication is that .leaves is a descendant of .tree.

position: absolute looks for the nearest ancestor with a set position in order to determine its own positioning context. Otherwise the absolute positioning would basically be relative to the viewport. If the position: relative was missing, the leaves would be against the bottom edge of the image.

source

edit: I mean .leaves, not .branch

NichEherVielleicht@feddit.org · 3 pts · 1y (7 replies)

Okay, nun weiß ich wie man Scharmbehaarung programmiert....

bleistift2@sopuli.xyz · 8 pts · 1y (3 replies)

Das ist nicht _iel.

Samsy@lemmy.ml · 3 pts · 1y (2 replies)

This is mad_css!!

bleistift2@sopuli.xyz · 2 pts · 1y (1 reply)

THIS IS SPARTAAA

Samsy@lemmy.ml · 1 pts · 1y

Hach, dachte fast den checkt keiner.

bleistift2@sopuli.xyz · 4 pts · 1y (1 reply)

Und *Scham

NichEherVielleicht@feddit.org · 2 pts · 1y

Scharm ^^

SubArcticTundra@lemmy.ml · 2 pts · 1y
[ removed ]
JasonMcCrea@lemmy.world · 2 pts · 1y

Saw this post about "CSS Gardening," and I'm reminded of debugging my first responsive website. Did anyone else spend hours wrestling with margins and padding, only to realize it was a typo in the media query? I did! Now I meticulously check my syntax.