-
Stacks on stacks on stacks, fam

-
-
-
For the following two images - with a partner - on your screen, draw out the HTML divs/sections you would have to use to create that layout.
-
-

-

-
The Box Model is a way of thinking about CSS DOM elements on the page. Instead of thinking of HTML elements as bits of HTML wrappers we style, we can think of them as boxes with specific dimensions and properties. Given this though, an HTML layout can be thought of as boxes within boxes.
-
-
Margin: space in between DOM elements
Padding: space within the DOM element
Border: the outline around the DOM Element.
In general, the width of a DOM element is padding + border + content.
-
The main implications of this has to do with building rows with multiple tags / items inside of it. The widths adding up to 100% isnβt enough β the width + padding + border + margin must add up to 100%!
-
This is a useful tool. We can use box-sizing to force the padding to be pulled into our content width. This way, padding is not added to the overall width. Types: content-box, border-box
πππ
-
The flex layout is a series of CSS properties that allows the container element to alter the dimensions of its children elements. A flex container will expand items to fill available space if there is any and shrink them to avoid overflow.
-
Consider the following image

-
-
-
NOTE: there is an align-self that can be applied to individual items in flex container
-
More info:
-
-
These are examples of CSS3 uses that we will either cover today or at some point in the duration of the course.
-
See if you can implement some of the more simple ones outlined here into one of your websites (either the resume or the Wendy Bite).
-
Here are some interesting use cases where CSS3 in particular becomes super handy.
-
You can do some really awesome work with animating your elements.
-
Transitions are animations that are triggered usually by some form of user interaction.
-
Psuedo classes allow us to style specific types of element features, i.e. the :hover pseudo selector can be used to style an element as the user puts his mouse over it.
-
Keep track of content and determine how it should behave if there is more content than space in the container.
-
This one is super expansive and you could literally teach an entire course on this. For now, take a look at a few examples / problems to gain perspective on this.
-