Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Image text alignment

Hi,

I am trying to align some text over an image and have given the image style a z-index of -1 and the text a z-index of 5 the image still obscures the text. How do I achieve this.

Regards,
Joe

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Image text alignment

Hello! z-index works only if you set for element position = absolute, fixed or relative. Please check that.

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Image text alignment

Hi Marina, Thanks or your reply. The complete css is:

.email
{
background-image: url("../image/ic_dialog_email.png")!important;
background-repeat:no-repeat;
width:65px;
height:55px;
position:fixed;
top:40px;
right:115px;
z-index:-1;
}

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Image text alignment

You should add CSS and set z-index for text too. Also try to use z-index with big numbers. For example for image z-index=1000 and for text z-index=2000.

Return to “Issues”