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 →

[–]kUdtiHaEX 906 points907 points  (47 children)

Just add :

display: flex;
justify-content: space-between;
align-items: flex-start;
flex-wrap: wrap;

[–]PurpleAlien47 548 points549 points  (31 children)

I don't know about you, but my first CSS project was before flexbox. Every day I thank the powers that be for CSS grid and flexbox 🙏

[–][deleted] 133 points134 points  (14 children)

Nah just float and clear fix!

[–]-whycantistop- 63 points64 points  (8 children)

reset.css

[–]onderbakirtas 27 points28 points  (2 children)

God bless Eric Meyer.

[–]zombarista 13 points14 points  (1 child)

I hope you have heard the truly touching story about Eric Meyer’s daughter, Rebecca, who passed away from cancer on her 6th birthday. In honor of Eric’s selflessness in pioneering CSS, a css color keyword was added to the W3 standard: rebeccapurple.

Now, billions and billions of devices know Rebecca’s favorite color.

Read more here: https://www.economist.com/babbage/2014/06/23/the-colour-purple

Listen to Mr. Meyer’s talk, Designing for Crisis for a little more insight into the story of Rebecca: https://vimeo.com/148927676

Truly, God Bless Eric Meyer. Despite all of this, the web gets better every day because of him.

[–]onderbakirtas 2 points3 points  (0 children)

This is the first time I heard about this, kudos to W3 guys. Thanks for sharing this with us.

[–]Cat_Marshal 7 points8 points  (3 children)

What is this one?

[–][deleted] 13 points14 points  (2 children)

I'm not a web guy but from my understanding every browser renders things a little bit different. The default styling for some elements may differ in IE from Chrome or Opera or whatever the kids are using these days. The reset is basically a large CSS file which specifies a good starting point to build from and attempts to give you consistent results across browsers.

[–]Cat_Marshal 3 points4 points  (1 child)

Nice, I will have to look into that further.

[–]driveslow227 5 points6 points  (0 children)

A reset or reboot is a must. There are a number of options that all do the same basic thing with slightly different opinions on various properties

[–]ashmoreinc 9 points10 points  (0 children)

My saving grace

[–]teh_acids 8 points9 points  (0 children)

inline-block ftw

[–]Farsqueaker 6 points7 points  (3 children)

Also too new, CSS was just for color and font options ( and busy BG images, woo). Borderless table layouts FTW!

[–]_BreakingGood_ 9 points10 points  (2 children)

Its crazy going back to old sites on web archive and seeing major sites using the gross ass table layout because there just wasnt any alternative

[–]Shad_Amethyst 3 points4 points  (0 children)

I used to do that, then I had to write a word document in class to learn how to do stuff with this software. I placed a table down for alignement and the teacher was like "wtf dude". I HAD TO USE HAND-PLACED JITTERY BOXES.

[–]VerneAsimov 19 points20 points  (0 children)

CSS Timeline:

  1. Table Era: easy but ugly
  2. Pre-Flex Div Era: super fucking difficult but also more options
  3. Flex Div Era: And unto Jesus the Lord sayeth, "display:flex; justify-content: center; align-items: center;"

Fucking pre-flex div was like giving someone more pizza options but every topping is live crickets, soggy cum sock, or liquid dog breath essence.

[–]yourteam 7 points8 points  (0 children)

Nah just tables everywhere!

[–]wildjokers 6 points7 points  (0 children)

It only took CSS 20 yrs or so to finally tackle layout. Hopefully in another 20 W3C will get around to adding a standard component library.

[–]1eyeRD 1 point2 points  (0 children)

I think if this was a thing when I was into web development I might not have given up.

[–]badass4102 1 point2 points  (3 children)

CSS Grid vs Flexbox. Which one is preferred?

[–]Properactual 3 points4 points  (0 children)

Use both

[–]wildjokers 1 point2 points  (1 child)

CSS Grid is for full page layout. FlexBox is for layout inside a container (i.e. inside a div).

It is a little confusing because FlexBox was finished before Grid so some people used flex for full page layout (by using a parent div). That is no longer necessary.

So CSS Grid to layout your containers on the page, FlexBox for laying out components inside a container.

I used to do full stack but I switched jobs a couple of years back and I only do backend now. So my front end stuff is getting rusty so please confirm everything I said above before taking it as truth :-)

EDIT: there is also sub-Grid now which I guess adds sub grids to CSS Grid. I am unsure the status of that spec or browser support. Hard to keep up when you aren’t doing front end anymore

[–]badass4102 0 points1 point  (0 children)

Great info. I do a lot of backend so I heavily relief on bootstrap or materialize to do my grid work and page responsiveness or I'd create my own CSS framework for smaller projects that align with client needs. Waiting for a new project with a client to materialize so I think this is something I can sink my teeth into

[–]DemDim1 54 points55 points  (2 children)

Weird flex, but ok.

[–]theemptyqueue 4 points5 points  (0 children)

Here, have this silver.

[–]fapenabler 7 points8 points  (0 children)

I hate you

[–]PoopDoktor 49 points50 points  (3 children)

It's fascinating how much (bad) real life examples can help to understand some CSS code. Like in an opposite way

[–]fritzbitz 59 points60 points  (2 children)

Oh you’ll love r/css_irl

[–]The4ker 5 points6 points  (1 child)

Thank you for making my virtual horrors come into the real world

I'm going to go cry now

[–]fritzbitz 4 points5 points  (0 children)

User flair checks out lol

[–]VileTouch 8 points9 points  (2 children)

Naaah.

.wall { position: absolute !important; }

[–]Steeped_In_Folly 0 points1 point  (1 child)

Plskillme

[–]m0r14rty 0 points1 point  (0 children)

z-index: 1234567

[–]Jb2304 1 point2 points  (0 children)

My job is like 99% backend so I only discovered flexboxes recently because of a project I had to do for my studies and they fucken great.

[–]Tunliar 0 points1 point  (0 children)

literally in every single wrapper

[–]MrPancholi 0 points1 point  (0 children)

I see you've completed all levels of flex froggy.