101.school
CoursesAbout
Search...⌘K
Generate a course with AI...

    Advance CSS

    Receive aemail containing the next unit.
    • CSS Grid Layout
      • 1.1Introduction to grid-based systems
      • 1.2Working with rows and columns
      • 1.3Creating complex, responsive designs
    • CSS Flexbox
      • 2.1Flexbox techniques: alignment and layout
      • 2.2Flexbox controls for UI components
    • Responsive Web Design
      • 3.1Implementing media queries
      • 3.2Employing fluid design principles
    • CSS Preprocessors
      • 4.1Introduction to CSS preprocessors: Sass, Less, and Stylus
      • 4.2Streamlining styling with variables, mixins, and functions
    • CSS Custom Properties (Variables)
      • 5.1Incorporating custom properties in design
      • 5.2Crafting dynamic and themeable styles
    • CSS-in-JS Libraries
      • 6.1Survey of CSS-in-JS solutions
      • 6.2Scoped and encapsulated styles for components
    • Animations and Transitions
      • 7.1Keyframes animations with CSS
      • 7.2Implementing engaging transitions
    • Advanced Selectors and Pseudo-classes
      • 8.1Understanding pseudo-classes
      • 8.2Styling with advanced selectors
    • CSS Architecture and Methodologies
      • 9.1Introduction to BEM and SMACSS
      • 9.2Structuring scalable, organized CSS
    • CSS Transforms and 3D Effects
      • 10.1Introducing CSS transforms
      • 10.2Creating engaging visual effects
    • CSS Filters and Blend Modes
      • 11.1Understanding and applying CSS filters
      • 11.2Creating unique compositions using blend modes
    • Web Fonts and Icon Fonts
      • 12.1Integrating custom web fonts and icon fonts
      • 12.2Enhancing typography and visual elements
    • Accessibility and Inclusive Design
      • 13.1Understanding ARIA roles and attributes
      • 13.2Designing for diverse user needs

    CSS Flexbox

    Introduction to Flexbox

    approach to web design for making web pages render well on a variety of devices

    Approach to web design for making web pages render well on a variety of devices.

    Flexbox, or the Flexible Box Layout, is a powerful layout tool that provides a more efficient way to align, distribute space, and manipulate items in a container, even when their sizes are unknown or dynamic. It is a one-dimensional layout model, meaning it deals with either rows or columns, but not both simultaneously.

    Understanding the Flexbox Model

    In the Flexbox model, the parent becomes a flex container and its children become flex items. The flex container expands items to fill available free space or shrinks them to prevent overflow.

    Flex Container and Flex Items

    The flex container is the parent element that you want to turn into a flexible box for layout purposes. This is done by setting its display property to flex or inline-flex. Once you do this, the direct children of this container automatically become flex items.

    .container { display: flex; }

    In the above example, .container is the flex container and its direct children are the flex items.

    Main Axis and Cross Axis in Flexbox

    The main axis is the primary axis along which flex items are laid out. It is not necessarily horizontal; it depends on the flex-direction property, which we will cover in the next unit. The start and end of this axis are called the main start and main end.

    The cross axis is perpendicular to the main axis. Its direction depends on the main axis direction. The start and end of this axis are called the cross start and cross end.

    Understanding these axes is crucial as many flexbox properties are based on these axes, not traditional layout block and inline directions.

    In this unit, we have introduced the Flexbox model, the concept of flex containers and flex items, and the main and cross axes. In the next unit, we will delve deeper into the properties of flex containers and flex items, and how they can be manipulated to create flexible and responsive layouts.

    Test me
    Practical exercise
    Further reading

    My dude, any questions for me?

    Sign in to chat
    Next up: Flexbox controls for UI components