Web Programming Course
SUT • Fall 2018
z-index
& Stacking ContextOverview
More on MDN
The layout is about positioning HTML elements to achieve the desired look. In contrast to the normal flow.
Float and Clearing
More on MDN
float
Takes an element out of document normal flow, causes in-flow line-boxes wrap the element.
More on MDN
More on MDN
Float Issue
More on MDN
The parent element ignores the floated child
Clearfix Hack
To make a parent contain its floated child
More on CSS-Tricks
Positioning
Topics
More on MDN
More on MDN
keeps elements in document normal flow.
The default positioning for elements.
position: static;
More on MDN
position: relative;
More on MDN
position: absolute;
More on MDN
Understanding the Containing Block!
The Context
Online DIY
More on MDN
How to make elements appear on top of other elements?
The z-index
Online DIY
More on MDN
Online DIY
More on MDN
Removes elements from normal flow.
Offsets relative to the initial containing block (viewport) with:
position: fixed;
More on W3C
Display, Positioning & Float Relationship
Flexbox
More on MDN
Flexbox
More on MDN
Example
More on MDN
Learn More
More on MDN
Alignment
More on CSS-Tricks
CSS Reset: strip away default styles
Learn more on CSS-Tricks: