/    Sign up×
Community /Pin to ProfileBookmark

What is z-index and where it’s work?

I’m mamun from Bangladesh.

I’m new of web development and i really want to know what is z-index also which of part it can be used? [url]http://www.webdeveloper.com/forum/images/smilies/confused.gif[/url]
Can anyone please help me. Actually i’m not able to do that.

Tnx and Regards,
Mamun

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@rtretheweySep 22.2013 — Search on "css z-index tutorial" and I'm sure you'll find your answer. You can't learn everything in a forum.
Copy linkTweet thisAlerts:
@Major_PayneSep 22.2013 — From Wikipedia, the free encyclopedia:

z-index is a CSS property that sets the stack order of specific elements. An element with greater stack order is always in front of another element with lower stack order.

p {

position: relative;

z-index: -1;

}

Negative stack orders can also be used in the same manner. A negative value will appear behind a more positive one. z-index only works on elements that have a position value (e.g. position: relative?.

SOURCE
Copy linkTweet thisAlerts:
@priyankagoundSep 23.2013 — Every webpage is made up of what are called stacking contexts. You can think of these as, quite literally, a stack of elements. The z-index property determines the order of items in each stack, with higher z-index being placed further up.

All pages begin with a root stacking context, which builds from the root element (as you'd expect). But more stacking contexts can be created in a number of ways. One way is an absolutely positioned div; its children will be in a new stacking context.

The specs lists all of the instances that create a new stacking context. As others have stated, this includes explicitly positioned elements and will soon include elements that aren't completely opaque.

z-index only takes effect if you explicitly set the position of the element. This means setting it to be fixed, absolute, or relative.
Copy linkTweet thisAlerts:
@mamunauthorSep 24.2013 — Thank you so much for your solution.

Really tnx all of you people
×

Success!

Help @mamun spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...