The z-index
CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one.
Calculator De Moivre's theorem - equation - calculation: z^4=1. Calculator for complex and imaginary numbers and expressions with them with a step-by-step explanation. Synonyms for resulting from include arising, arising from, arising out of, coming from, developing out of, following from, stemning from, deriving from, emanating from and proceeding from. Find more similar words at wordhippo.com!
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
For a positioned box (that is, one with any position
other than static
), the z-index
property specifies:
- The stack level of the box in the current stacking context.
- Whether the box establishes a local stacking context.
Syntax
The z-index
property is specified as either the keyword auto
or an <integer>
.
Values
auto
- The box does not establish a new local stacking context. The stack level of the generated box in the current stacking context is the same as its parent's box.
<integer>
- This
<integer>
is the stack level of the generated box in the current stacking context. The box also establishes a local stacking context in which its stack level is0
. This means that the z-indexes of descendants are not compared to the z-indexes of elements outside this element.
Formal definition
Initial value | auto |
---|---|
Applies to | positioned elements |
Inherited | no |
Computed value | as specified |
Animation type | an integer |
Creates stacking context | yes |
Formal syntax
Examples
Visually layering elements
Specifications
Specification | Status | Comment |
---|---|---|
CSS Level 2 (Revision 1) The definition of 'z-index' in that specification. | Recommendation | Initial definition |
Browser compatibility
Z Resulting
BCD tables only load in the browser
See also
- CSS
position
property
Zzzzz. Remember sleeping through the night? Not lately?
If you’re lying awake night after night, unable to sleep, you may want to talk to your health care provider about it. He or she may prescribe insomnia medicines such as eszopiclone (Lunesta), zaleplon (Sonata) and zolpidem (Ambien, Ambien CR, Edluar, and Zolpimist)—sometimes known as “Z-drugs”—to help you get a good night’s sleep. But as with any medication, there are risks.
Prescription-only “Z-drugs” work by slowing activity in the brain. Used properly, they can help you sleep. Quality sleep can have a positive impact on physical and mental health. But the treatments also carry the risk—though rare—of serious injuries, and even death.
Z Results
FDA wants you and your health care provider to be fully aware of these risks, so the agency is requiring the addition of a new Boxed Warning—FDA’s most prominent warning—to the prescribing information, known as “labeling,” and patient Medication Guides. In addition, FDA is adding a contraindication, which is the agency’s strongest warning, stating that patients who have experienced an episode of what is known as complex sleep behavior should not take these drugs.
What Are Complex Sleep Behaviors?
Complex sleep behaviors occur while you are asleep or not fully awake. Examples include sleepwalking, sleep driving, sleep cooking, or taking other medicines. FDA has received reports of people taking these insomnia medicines and accidentally overdosing, falling, being burned, shooting themselves, and wandering outside in extremely cold weather, among other incidents. Since Ambien was approved in 1992, the FDA has identified 66 serious cases of complex sleep behaviors after a person has taken a Z-drug, 20 of which resulted in death.
Considering the large number of individuals who take the drugs, FDA wants people to be aware of the potential dangers, including death, that can occur as a result. Patients may not remember these behaviors when they wake up the next morning. Moreover, they may experience these types of behaviors after their first dose of one of these Z-drugs, or after continued use.
Your Health Care Provider Has Prescribed a Z-Drug for You: What Should You Do?
If your health care provider prescribes a Z-drug to help you sleep, here are some things to keep in mind:
- Talk with your health care provider about all of the benefits and risks of taking this medicine.
- Read the patient Medication Guide as soon as you get the prescription filled and before you start taking the medicine. If you have any questions, or if there’s anything you don’t understand, ask your prescriber.
- If, after taking the medication, you experience a complex sleep behavior in which you engage in activities while not fully awake or take actions that you do not remember, stop taking the drug and contact your prescriber immediately.
- These events can occur on the first night you use these medicines, or after a much longer period of treatment.
Complex sleep behaviors can occur at lower dosages as well as high dosages. It’s important to follow carefully the dosing instructions in the Patient Medication Guide.
- Don’t take these medicines with any other sleep medicines, including those you can buy over-the-counter without a prescription.
- Don’t drink alcohol before or while taking these medicines. Together they may be more likely to cause side effects.
- You may still feel drowsy the day after taking one of these drugs. Keep in mind that all medicines taken for insomnia can impair your ability to drive and activities that require alertness the morning after use.
- For information on healthy sleep habits, visit the National Heart, Lung, and Blood Institute for resources, including: Your Guide to Healthy Sleep and Insomnia: Relaxation techniques and sleeping habits.