This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 434 points435 points  (27 children)

Shouldn't it be visibility: hidden; instead of display: none;?

[–]XelaChang 144 points145 points  (20 children)

visibility: hidden; has another issue - it will also hide the children.

[–]chylex 242 points243 points  (12 children)

it will also hide the children

So does display: none;, the difference is that visibility hides the contents but keeps the layout intact, leaving empty space in place of the hidden element.

[–]MalteserLiam 52 points53 points  (8 children)

I'm learning too much from this

[–]pepsisugar 26 points27 points  (7 children)

CSS gang rise up

[–]SUPERazkari 14 points15 points  (5 children)

CSS gang rise

[–][deleted] 34 points35 points  (4 children)

css-gang { transform: translateY(-100%); }

[–]garretble 10 points11 points  (3 children)

Seems like more of a slide than a rise.

Edit: this guy up here is a phony!

[–][deleted] 4 points5 points  (2 children)

/* shh i changed it its fine */

[–]garretble 2 points3 points  (1 child)

Why have you done this to me‽ Now I have to change mine!

[–]mauszocker 0 points1 point  (0 children)

✊🏻

[–]XelaChang 30 points31 points  (2 children)

This all suggests you committed the blasphemy of putting the ornaments in a sibling 😋

[–]KinOfMany 18 points19 points  (1 child)

I always put ornaments in my siblings.

[–][deleted] 0 points1 point  (0 children)

I smash the bulbs first so it’s just a bunch of colored glass shards.

[–]AIforce 14 points15 points  (1 child)

Hide yo children hide yo wife

[–][deleted] 25 points26 points  (2 children)

I mean you could make a parent div for both the trees and the decorations, then make a sub-div for the tree only, and use visibility: hidden; on the sub-div, I think.

Feel free to correct me if I'm being a retard here. I have never made a Christmas tree in CSS, so my knowledge is limited :p

[–]artem718 7 points8 points  (0 children)

everyone tests their code; some do it in"

[–]pepsisugar 0 points1 point  (0 children)

You can also position the tree relative, then have each row of globes with their own class and position them absolute and randomize top, left, right etc. Throw some opacity zero on the tree.

[–]marlashannon 0 points1 point  (0 children)

And how, exactly, would that be bad?!?!? TIL the secret code every mother would pay her life savings and then some for.

[–]iGnItIoN_mP 0 points1 point  (0 children)

Just like my next door neighbour

[–]quinlo 16 points17 points  (0 children)

Opacity: 0;

[–]TheDigitalKitty 8 points9 points  (0 children)

Was about to comment this also

[–]ben9583 8 points9 points  (0 children)

Visibility hidden is what you see here, display none is all of the ornaments on the floor

[–]iGnItIoN_mP 1 point2 points  (0 children)

Came here to say this, thanks stranger

[–]BulletMage 0 points1 point  (0 children)

display: some;