[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-701117-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-701117-en":130,"doc-similar-701117":161},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","flexbox-in-css-oreilly-media-book","Flexbox in CSS - O’Reilly Media Book","","Comprehensive guide to CSS Flexible Box Layout (Flexbox), explaining the problems it addresses and building practical understanding from foundational concepts to advanced behavior. Covers core mechanisms such as flex container properties and shorthands, flex item features including sizing and growth/shrink rules, and alignment controls across axes. Includes multiple responsive layout examples, demonstrating real-world patterns and performance considerations for creating flexible, maintainable web interfaces.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/flexbox-in-css-oreilly-media-book/701117/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/flexbox-in-css-oreilly-media-book/701117.png","ImageObject",300,407,{"name":42,"@type":43},"Cart","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-17","2026-11-12",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",5,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What problem does Flexbox in CSS address?","Question",{"text":63,"@type":64},"The book introduces Flexbox as a way to handle layout challenges addressed by CSS Flexible Box Layout, then guides readers through progressively more capable solutions.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Which properties are covered for a flex container?",{"text":68,"@type":64},"It covers flex container properties including flex-flow, flex-direction, flex-wrap, justify-content, align-items, and align-content, along with discussion of flex line dimensions.",{"name":70,"@type":61,"acceptedAnswer":71},"How does the book help readers use flex items in practice?",{"text":72,"@type":64},"It explains flex item features such as sizing and growth/shrink behavior via flex, flex-grow, flex-shrink, flex-basis, plus controls like align-self and order, then reinforces understanding with multiple layout examples.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},701117,1794523532,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":55,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":107,"preview_page_count":33,"preview_urls":144},18829141979164,"https://eur-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Flexbox in CSS  \nUnderstanding CSS Flexible Box Layout  \nEstelle Weyl  \nBeijing  Boston  Farnham  Sebastopol  Tokyo   \nFlexbox in CSS  \nby Estelle Weyl  \nCopyright © 2017 Estelle Weyl. All rights reserved.  \nPrinted in the United States of America.  \nPublished by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.  \nO’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles ([http://oreilly.com/safari](http://oreilly.com/safari)). For more information, contact our corporate/insti‐  \ntutional sales department: 800-998-9938 or [corporate@oreilly.com](corporate@oreilly.com).  \nEditor: Meg Foley  \nProduction Editor: Colleen Lobner  \nCopyeditor: Amanda Kersey  \nInterior Designer: David Futato  \nCover Designer: Randy Comer  \nIllustrator: Rebecca Demarest  \nJune 2017: First Edition  \nRevision History for the First Edition  \n2017-05-23: First Release  \nThe O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Flexbox in CSS, the cover image of salmon, and related trade dress are trademarks of O’Reilly Media, Inc.  \nWhile the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.  \n978-1-491-98142-9  \n[LSI]  \nTable of Contents  \nPreface........................................................................ v  \n1. Flexbox.................................................................... 1  \nThe Problem Addressed 1  \nSimple Solutions 6  \nLearning Flexbox 7  \nThe display Property 8  \n2. Flex Container............................................................. 13  \nFlex Container Properties 13  \nThe flex-flow Shorthand Property 14  \nThe flex-direction Property 15  \nThe flex-wrap Property 23  \nFlex Line Cross Dimension 34  \nFlex Container 35  \nThe justify-content Property 36  \njustify-content Examples 44  \nThe align-items Property 45  \nalign-items: stretch 48  \nalign-items: flex-start 50  \nalign-items: flex-end 50  \nalign-items: center 51  \nalign-items: baseline 52  \nAdditional Notes 53  \nThe align-content Property 54  \n3. Flex Items................................................................. 65  \nWhat Are Flex Items? 65  \nFlex Item Features 66  \nmin-width 68  \nFlex Item–Specific Properties 69  \nThe flex Property 70  \nThe flex-grow Property 71  \nNon-Null Growth Factor 73  \nGrowing Proportionally Based on Growth Factor 73  \nGrowth Factor with Different Widths 74  \nGrowth Factors and the flex Property 75  \nThe flex-shrink Property 79  \nProportional Based on Width and Shrink Factor 82  \nIn the Real World 83  \nDiffering Bases 85  \nThe flex-basis Property 87  \ncontent 88  \nauto 90  \nDefault Values 91  \nLength Units 92  \nZero Basis 97  \nThe flex Shorthand Property 98  \nCommon flex Values 98  \nCustom flex Values 104  \nSticky Footer with flex 108  \nThe align-self Property 110  \nThe order property 111  \nTabbed Navigation Revisited 114  \n4. Flexbox Examples......................................................... 117  \nResponsive Two-Column Layout 117  \nWider Screen Layout 121  \nPower Grid Home Page 122  \nSections 127  \nVertical Centering 132  \nInline Flex Example 132  \nCalendar 133  \nMagic Grid 138  \nPerformance 142  \nGood to Go 142  \nPreface  \nConventions Used in This Book  \nThe following typographical conventions are used in this book: Italic  \nIndicates new terms, URLs, email addresses, filenames, and file extensions. Constant","cbCaih2BPfIibAZ6","https://ap.wps.com/l/cbCaih2BPfIibAZ6","pdf",4413003,16,"English","# Preface\n# 1. Flexbox\n## The Problem Addressed\n## Simple Solutions\n## Learning Flexbox\n## The display Property\n# 2. Flex Container\n## Flex Container Properties\n## The flex-flow Shorthand Property\n## The flex-direction Property\n## The flex-wrap Property\n## Flex Line Cross Dimension\n## The justify-content Property\n## The align-items Property\n## The align-content Property\n# 3. Flex Items\n## What Are Flex Items?\n## Flex Item Features\n## The flex Property\n## The flex-grow Property\n## The flex-shrink Property\n## The flex-basis Property\n## The align-self Property\n## The order property\n# 4. Flexbox Examples\n## Responsive Two-Column Layout\n## Wider Screen Layout\n## Power Grid Home Page\n## Vertical Centering\n## Calendar\n## Magic Grid\n## Performance","[{\"question\":\"What problem does Flexbox in CSS address?\",\"answer\":\"The book introduces Flexbox as a way to handle layout challenges addressed by CSS Flexible Box Layout, then guides readers through progressively more capable solutions.\"},{\"question\":\"Which properties are covered for a flex container?\",\"answer\":\"It covers flex container properties including flex-flow, flex-direction, flex-wrap, justify-content, align-items, and align-content, along with discussion of flex line dimensions.\"},{\"question\":\"How does the book help readers use flex items in practice?\",\"answer\":\"It explains flex item features such as sizing and growth/shrink behavior via flex, flex-grow, flex-shrink, flex-basis, plus controls like align-self and order, then reinforces understanding with multiple layout examples.\"}]","Flexbox in CSS - O’Reilly Media Book | PDF",[145,149,153,157],{"page_no":22,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/6c32f8ea83790fac5ed9c6a213cbb1a7.webp",983,1290,{"page_no":26,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/0875f80de71034c657713fc051a83d43.webp",982,1289,{"page_no":30,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/726acf0fe8b952e66ef14384c6350ea5.webp",981,1288,{"page_no":33,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/5837f04f3fb4c1b7d2b6cb34ff9bad3c.webp",980,1286,{"list":162,"token":11},[163,169,175,181,187,193,199,205,212,218],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":33,"category_name":29,"create_tm":168},701113,"A Complete Guide to Flexbox - CSS flexbox properties","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012050504/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=%2BZzYcQYcCfyBckepTJFAXnWtIMA%3D","a-complete-guide-to-flexbox-css-flexbox-properties",1794523516,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":30,"category_name":29,"create_tm":174},701112,"Understanding Flexbox - CSS Flexbox Basics and Layout Building","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012050509/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=ky1lSU4EvsnYq4ERgp18SHjXszU%3D","understanding-flexbox-css-flexbox-basics-and-layout-building",1794523515,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":105,"category_name":29,"create_tm":180},703160,"CSS in Depth - Second Edition - comprehensive CSS learning guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230013426146/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=Wn%2BMknCXiWcJg2CzPYbhzo%2BvuIM%3D","css-in-depth-second-edition-comprehensive-css-learning-guide",1794561904,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":101,"category_name":29,"create_tm":186},703161,"Cascading Style Sheets (CSS) Course Syllabus","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230013426121/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=2Vn3ns5i8km0absXfaNylK%2F%2B3Fk%3D","cascading-style-sheets-css-course-syllabus",1794561905,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":30,"category_name":29,"create_tm":192},701114,"Introducing CSS Flexbox Layout - read online free","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012050525/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=OWoxLwwyBiQqnBHtszw9vqI%2F4g8%3D","introducing-css-flexbox-layout-read-online-free",1794523525,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":33,"category_name":29,"create_tm":198},701118,"CS193X: Web Programming Fundamentals - Lecture 5 - Spring 2017","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011579050/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=4C66mFfrmXQz2yjOdXVH98eLEdE%3D","cs193x-web-programming-fundamentals-lecture-5-spring-2017",1794523552,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":55,"category_name":29,"create_tm":204},693034,"CSS Handbook","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230005053838/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=7opr9xAeASXho78R5ySkBC1eakw%3D","css-handbook",1794246437,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":210,"category_name":29,"create_tm":211},116284,"CSS Master - 3rd Edition - A guide to CSS mastery","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834220651/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=9u1d0VSIDrjP13f%2FmMoZEMFxxIg%3D","css-master-3rd-edition-a-guide-to-css-mastery",22,1785657984,{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":30,"category_name":29,"create_tm":217},703169,"CSS in Depth - Box model and border-box sizing","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230013426719/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=pOOFqOZyVr7i7BljlE33qVxzyeY%3D","css-in-depth-box-model-and-border-box-sizing",1794561927,{"doc_id":219,"doc_title":220,"file_type":137,"home_preview_img_url":221,"slug":222,"view_count":110,"category_name":29,"create_tm":223},703167,"CSS From A To Z - Introduction to CSS - read online free","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230013426264/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=DAf6kDgtFG%2ByPiMSDcQlkEA3JEk%3D","css-from-a-to-z-introduction-to-css-read-online-free",1794561915]