Overflow Property:
- This property handles the overflow content
- This property works for block of elements with specified height and width.
- Syntax: Overflow: value;
- Values are
- visible
- hidden
- scroll
- auto
- Visible: This is default value of overflow. Content is not clipped when it is outside of box.
- Hidden: Overflowing content will be hidden.
- Scroll: Similar to hidden except users will be able to scroll the hidden content.
- Auto: If the content proceeds out of its box then content will be hidden and scroll bar is visible to read the rest of content.
Code:
Output:
Z-Index Property:
- This property sets the z-order of positioned element and its decedent or fixed items.
- Overlapping with larger z-index cover those with a smaller one.
- Syntax: Z-index: value.
- default value is auto.
- values are
- auto: The stack level of the generated box in the current stacking context is the same as its parent's box.
- number: This establishes a local stacking context in which its stack level is 0. We can give negative numbers also.
- This property works on positioned elements.
Code:
Output: