Link to home
Create AccountLog in
Avatar of ellandrd
ellandrdFlag for Ireland

asked on

image overlapping text IE7 z-index

Please see: http://www.personal-performance-agency.com/

Notice the image in the bottom left corner.  Some text from the body section of the page is hidden behind this image.  How can i fix this?  I have tried using z-index but it didnt work:

z-index:-10 is what i tired...

Please advise.

ellandrd
Avatar of TName
TName

You shouldn't use negative z-index values, as Firefox would position those elements behind the body of the page (they would become invisible in FF). Instead, you should assign a higher positive z-index value to the element you want to position in front.

Also, "z-index" will only work for elements positioned other than static (the default value), for instance you should specify "position:relative;" for the element you want to assign the z-index to.
Avatar of ellandrd

ASKER

My Firefox stylesheet doesn't have the z-index.  Only my IE7 stylesheet has the z-index.

I have tried added the z-index to the body div but does it require the position:relative/absolute to work as I have tried both.
I don't see why you would give the body itself a z-index or why you would position it.
The body does/should contain all other visible elements, so positioning the body itself in the z-axis shouldn't have any effect.
What you should do is to assign a relative (or absolute) position and a higher z-index to the element you want to bring in front of the image. BTW, I cannot test in IE7 at the moment.
ASKER CERTIFIED SOLUTION
Avatar of TName
TName

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
>>The body does/should contain all other visible elements, so positioning the body itself in the z-axis shouldn't have any effect.

sorry i have a div element called body.  i didnt mean give the <body> an z-index.

>>BTW, I cannot test in IE7 at the moment.

thats ok.

>>And if you do not want to do it inline, assign the p an id instead:

i will try this out now...
cheers that seems to work better now.

thank you

ellandrd