Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. CSS Gardening

CSS Gardening

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
22 Posts 13 Posters 18 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y [email protected]

    Why is .tree's position relative?

    B This user is from outside of this forum
    B This user is from outside of this forum
    [email protected]
    wrote last edited by [email protected]
    #11

    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

    1 Reply Last reply
    4
    • S [email protected]

      Sadly

      position: top;
      

      is not valid css. It should say

      position: absolute;
      bottom: 0px;
      

      Still funny though.

      S This user is from outside of this forum
      S This user is from outside of this forum
      [email protected]
      wrote last edited by
      #12

      Ah, the author fixed it. Good job.

      hemmes@lemmy.worldH 1 Reply Last reply
      10
      • S [email protected]

        Ah, the author fixed it. Good job.

        hemmes@lemmy.worldH This user is from outside of this forum
        hemmes@lemmy.worldH This user is from outside of this forum
        [email protected]
        wrote last edited by
        #13

        Thank God, that would’ve eaten me alive

        1 Reply Last reply
        2
        • bleistift2@sopuli.xyzB [email protected]

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

          hemmes@lemmy.worldH This user is from outside of this forum
          hemmes@lemmy.worldH This user is from outside of this forum
          [email protected]
          wrote last edited by
          #14

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

          1 Reply Last reply
          6
          • bleistift2@sopuli.xyzB [email protected]
            This post did not contain any content.
            W This user is from outside of this forum
            W This user is from outside of this forum
            [email protected]
            wrote last edited by
            #15

            https://csszengarden.com/

            S 1 Reply Last reply
            10
            • W [email protected]

              https://csszengarden.com/

              S This user is from outside of this forum
              S This user is from outside of this forum
              [email protected]
              wrote last edited by
              #16

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

              1 Reply Last reply
              3
              • S [email protected]

                Sadly

                position: top;
                

                is not valid css. It should say

                position: absolute;
                bottom: 0px;
                

                Still funny though.

                S This user is from outside of this forum
                S This user is from outside of this forum
                [email protected]
                wrote last edited by
                #17

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

                Jk, you're fine.

                1 Reply Last reply
                2
                • nichehervielleicht@feddit.orgN [email protected]

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

                  subarctictundra@lemmy.mlS This user is from outside of this forum
                  subarctictundra@lemmy.mlS This user is from outside of this forum
                  [email protected]
                  wrote last edited by
                  #18

                  Sprich Angelsächsisch du Hurensohn!

                  1 Reply Last reply
                  1
                  • S [email protected]

                    Sadly

                    position: top;
                    

                    is not valid css. It should say

                    position: absolute;
                    bottom: 0px;
                    

                    Still funny though.

                    A This user is from outside of this forum
                    A This user is from outside of this forum
                    [email protected]
                    wrote last edited by
                    #19

                    The px is making me eyes itch.

                    1 Reply Last reply
                    0
                    • S [email protected]

                      This is mad_css!!

                      bleistift2@sopuli.xyzB This user is from outside of this forum
                      bleistift2@sopuli.xyzB This user is from outside of this forum
                      [email protected]
                      wrote last edited by
                      #20

                      THIS IS SPARTAAA

                      S 1 Reply Last reply
                      1
                      • bleistift2@sopuli.xyzB [email protected]

                        THIS IS SPARTAAA

                        S This user is from outside of this forum
                        S This user is from outside of this forum
                        [email protected]
                        wrote last edited by
                        #21

                        Hach, dachte fast den checkt keiner.

                        1 Reply Last reply
                        0
                        • bleistift2@sopuli.xyzB [email protected]
                          This post did not contain any content.
                          J This user is from outside of this forum
                          J This user is from outside of this forum
                          [email protected]
                          wrote last edited by
                          #22

                          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.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups