Page 1 of 1

[Solved] z-index confusion

Posted: Fri Aug 08, 2008 6:13 pm
by izzysanime
Hi,

Some times I get the z-index working and some times I do not.  What am i doing wrong? ^_^

Code: Select all

.thrColEls #mainHome {
	margin-left: 24px;
	margin-right: 20px;
	margin-top: -7px;
	background-repeat: no-repeat;
        z-index: 0;
}
}
#1 {
        z-index: 2;
}
The #1 image is still behind the mainHome image.

Thanks,
Josh

Re: z-index confusion

Posted: Fri Aug 08, 2008 6:19 pm
by Dr.CSS
You have one too many }...

.thrColEls #mainHome {
margin-left: 24px;
margin-right: 20px;
margin-top: -7px;
background-repeat: no-repeat;
        z-index: 0;
}
}
#1 {
        z-index: 2;
}

Re: z-index confusion

Posted: Fri Aug 08, 2008 6:43 pm
by izzysanime
o, woops.  thanks.  I also added

Code: Select all

position: relative;
earlier and that worked, but thanks for noticing the extra }