CSS Grid Columns, Rows and Gaps
Grid Columns The vertical lines of grid items are called columns. Grid Rows The horizontal lines of grid items are called rows. Grid Gaps The spaces between each column/row are called gaps.
Grid Columns The vertical lines of grid items are called columns. Grid Rows The horizontal lines of grid items are called rows. Grid Gaps The spaces between each column/row are called gaps.
See the Pen CSS Grid Layout Module by Iampsp.com (@iampsp) on CodePen.
Responsive Flexbox You learned from the CSS Media Queries chapter that you can use media queries to create different layouts for different screen sizes and devices. For example, if you want to create a two-column layout for most screen sizes,…
The CSS Flex Items The direct child elements of a flex container automatically becomes flex items. The element above represents four blue flex items inside a grey flex container. Example <div class=”flex-container”> <div>1</div> <div>2</div> <div>3</div> <div>4</div> </div>
The CSS Flex Container The flex container becomes flexible by setting the display property to flex: Example .flex-container { display: flex; }
See the Pen CSS Flexbox by Iampsp.com (@iampsp) on CodePen. What is CSS Flexbox? Flexbox is short for the Flexible Box Layout module. Flexbox is a layout method for arranging items in rows or columns. Flexbox makes it easier to…
CSS Media Queries The @media rule, introduced in CSS2, made it possible to define different style rules for different media types. Media queries in CSS3 extended the CSS2 media types idea: Instead of looking for a type of device, they…
CSS Box Sizing The CSS box-sizing property allows us to include the padding and border in an element’s total width and height. Without the CSS box-sizing Property By default, the width and height of an element is calculated like this:…
CSS @property Rule The @property rule is used to define custom CSS properties directly in the stylesheet without having to run any JavaScript. The @property rule has data type checking and constraining, sets default values, and defines whether the property…