z-index sets the stack order of an element - HTML

Q.  Which CSS property sets the stack order of an element?
- Published on 19 Oct 15

a. z-index
b. position
c. overflow
d. clip

ANSWER: z-index
 

    Discussion

  • Nirja Shah   -Posted on 05 Nov 15
    z-index property
    - It specifies the stack order of an element.

    - An element with greater stack order is always in front of an element with a lower stack order.

    - This property works only on positioned elements (position:absolute, position:relative, or position:fixed).
    Default value: auto
    Inherited: no
    Animatable: yes. Read about animatable
    Version: CSS2
    JavaScript syntax: object.style.zIndex="-1"

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)