all 11 comments

sorted by: hot top controversial new old
[–] 32 points 1 year ago (4 children)

Sadly

position: top;

is not valid css. It should say

position: absolute;
bottom: 0px;

Still funny though.

  • source
  • hideshow 4 child comments
  • [–] 21 points 1 year ago

    If you trim that bush, it'll seem larger

  • source
  • [–] 8 points 1 year ago (3 children)

    Why is .tree's position relative?

  • source
  • hideshow 3 child comments
  • [–] 6 points 1 year ago* (last edited 1 year ago)

    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

  • source
  • parent
  • [–] 2 points 1 year ago

    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.

  • source