HTML All The Things - Web Development, Web Design, Small Business

Box, Flexbox, and Grid


Listen Later

We dive into the different CSS layout methods that have evolved over recent years including box model, flexbox, and grid.

Segment 1 - Layout Models

  • StackChief reference article
  • Box Model
    • Elements comprise of: content, padding, border, margin
  • Dimensions like height and width
  • Floats and clearfix
  • CSS Box Model - W3Schools article
  • Flexbox
    • Evolution of the box model
  • Comprises of a container element called the flex container, which "control" their child elements called flex items
  • Flexbox is fantastic for responsive layouts
  • 1 dimensional layouts
  • CSS Grid
    • New CSS layout method that is supported in the latest version of major browsers (IE doesn't have support)
  • 2 dimensional layouts
  • Can customize every property of the grid 
    • # of rows and columns
  • size of row in various metrics (px, %, vh, vw, auto)
  • spacing between rows and columns
  • Very clean code - no need for row and column containers
  • Segment 2 - Box vs Flexbox vs Grid

    • Responsivity
    • Box, flexbox, and grid can all be used to make responsive layouts
  • Many of our production websites are still in box layout, they still work without issue on modern browsers and devices
  • Layouts
    • Basic sites can use any of the layout models
  • Site components (ie navbar) can be made easily with flexbox due to their one dimensional layout
  • Full site structures are easier to make with CSS grid due to two dimensional column and row functionality
  • Easy of Use
    • Matt believes the box model is easiest to learn - especially when learning how web pages flow
    • Box model is more human readable, whilst flexbox allows for more complex layouts with less code and micromanaging
  • Links
    • Box Model - https://caniuse.com/#feat=inline-block
  • Flexbox - https://caniuse.com/#search=flex
  • Web News - 'Unobtrusive Ads'

    • Ad strategies - which are you ok with?
    • Sponsored posts
  • Banner ads (Google Ads, etc.)
  • Full page timed ads
  • Sidebar ads
  • Chumbox (From around the web, recommended for you)
  • What are some ad strategies that annoy you?
  • Do you think ads on a web page or app are a fair way to monetize? (freemium ad supported)
  • Do you care what companies' ads are served to you? (ie you don't like Coke but like Pepsi)
  • Support Us

    • TP Link Deco Whole Home Mesh WiFi System (Amazon Affiliates Link)
  • Become a Patreon Supporter
  • You can find us on...

    Facebook | Twitter | Instagram | 

    RSSSpotify | Reddit

    Medium | YouTube | GitHub

    ...more
    View all episodesView all episodes
    Download on the App Store

    HTML All The Things - Web Development, Web Design, Small BusinessBy Matt Lawrence and Mike Karan

    • 4.8
    • 4.8
    • 4.8
    • 4.8
    • 4.8

    4.8

    48 ratings


    More shows like HTML All The Things - Web Development, Web Design, Small Business

    View all
    Hanselminutes with Scott Hanselman by Scott Hanselman

    Hanselminutes with Scott Hanselman

    383 Listeners

    The Changelog: Software Development, Open Source by Changelog Media

    The Changelog: Software Development, Open Source

    289 Listeners

    The 5 AM Miracle: Healthy Productivity for High Achievers by Jeff Sanders

    The 5 AM Miracle: Healthy Productivity for High Achievers

    722 Listeners

    Software Engineering Daily by Software Engineering Daily

    Software Engineering Daily

    625 Listeners

    Talk Python To Me by Michael Kennedy

    Talk Python To Me

    585 Listeners

    Python Bytes by Michael Kennedy and Brian Okken

    Python Bytes

    215 Listeners

    Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

    Syntax - Tasty Web Development Treats

    987 Listeners

    CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

    CoRecursive: Coding Stories

    190 Listeners

    .NET Rocks! by Carl Franklin and Richard Campbell

    .NET Rocks!

    244 Listeners

    The Stack Overflow Podcast by The Stack Overflow Podcast

    The Stack Overflow Podcast

    63 Listeners

    All-In with Chamath, Jason, Sacks & Friedberg by All-In Podcast, LLC

    All-In with Chamath, Jason, Sacks & Friedberg

    9,922 Listeners

    Cyber Security Headlines by CISO Series

    Cyber Security Headlines

    139 Listeners

    Marketing Against The Grain by Hubspot Media

    Marketing Against The Grain

    358 Listeners

    web3 with a16z crypto by a16z crypto, Robert Hackett, Sonal Chokshi

    web3 with a16z crypto

    60 Listeners

    AI + a16z by a16z

    AI + a16z

    35 Listeners