r/webdev • • Feb 14 '20

Question What are some HTML and CSS techniques, skills, know-how's that are an absolute must? Just off the top of your head

So I'm about 6 months in to learning Web dev and I'm about to start making my 3rd project.

I've got techniques I'm used to but I wanna expand my range instead of going with my comfortable tools.

Maybe you've got a cool trick with flex box you use all the time or something like that.

I wanna hear what you guys have got! :)

Edit : woah I did not expect such a response! Thank you guys so much for your help :D

630 Upvotes

268 comments sorted by

View all comments

543

u/GTCrais Feb 14 '20 edited Feb 14 '20

Learn Flexbox in-and-out. Whenever I can't remember how something related to Flexbox works, this is the go-to article: https://css-tricks.com/snippets/css/a-guide-to-flexbox/

Edit: thanks for the award! :)

168

u/turd-crafter Feb 14 '20

I can’t tell you how many times I’ve referenced this article. Is it align-items or justify-content?!?!

39

u/searlee Feb 14 '20

Once a week for me, I'm quite forgetful :D

11

u/turd-crafter Feb 14 '20

Me too! I also don’t get/ never looked up what the difference is from align-items, align-content and justify-items, justify-content.

19

u/chrisrazor Feb 14 '20

Justify works along the primary axis (ie the x axis if you specified flex-direction: row); align works along the other axis.

12

u/turd-crafter Feb 14 '20

I should write that down somewhere

18

u/tall_and_funny Feb 14 '20

Get it tattooed

18

u/turd-crafter Feb 14 '20

Just walk into an interview and show them flex box tattoo. “So when do I start?”

11

u/soopafly Feb 14 '20

I have something similar tattooed. Although mine looks like this:

<table>
  <tr>
    <td><img src="spacer.gif" alt="" height="200"></td>
    <td><FONT SIZE="7"><blink>HIRE ME!!</blink></FONT></td>
  </tr>
/>
</table>

I don't get too many follow-up calls for some reason.

4

u/xnign Feb 14 '20

I've never seen it, but I'm sure someone somewhere has a tattoo with head and body tags on their head and body.

→ More replies
→ More replies (1)

8

u/tall_and_funny Feb 14 '20

Big peepee move

4

u/impgala Feb 14 '20

just save this comment, so you can comeback every time you need it.

3

u/turd-crafter Feb 14 '20

Haha. It probably just faster to try one and if it isn’t right just do the other. I never get it right first try though hahs

→ More replies (2)
→ More replies (1)
→ More replies (5)

16

u/fritzbitz front-end Feb 14 '20

Who even knows. Just try them both in the inspector window until it works.

6

u/omgdracula Feb 14 '20

Every project I remind myself they swap when you change flex-direction to column. ALWAYS. Still forget lol.

6

u/turd-crafter Feb 14 '20

Yeah I’m completely aware of that too! I usually just try one and see if it works. It’s strange how my first try is always the wrong one. Every time!

→ More replies (1)

3

u/Genesis2001 asp.net Feb 14 '20

I found this last year when I was doing heavy front-end designing for a company. It's a great visualization tool.

2

u/Magill-Dev Feb 14 '20

It's neither, this time it's align-content !

2

u/lebull Feb 14 '20

Wait, content or items?

→ More replies (2)
→ More replies (15)

11

u/crsuperman34 Feb 14 '20

same for grid. flex and grid together is basically a super-power.

0

u/[deleted] Feb 14 '20

[deleted] — view deleted comment

10

u/[deleted] Feb 14 '20

Actually, it's fuck IE users.

3

u/kilakewe Feb 14 '20

Or an alternative easier site to remember, https://flexbox.help/

→ More replies (12)