Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Z-index Won't Work

Tags:

css

z-index

Possible Duplicate:
Css z-index problem

I have an issue where one image is infront of another and z-index doesnt seem to change it. I am trying to make it so the logo is on top of the gray bars image.

http://jsfiddle.net/vzPUw/

Can anyone explain to me why this is not working?

like image 373
Nate Gines Avatar asked Jan 30 '26 22:01

Nate Gines


1 Answers

z-index only works with position : relative/absolute/fixed so give position:relative to your logo.

http://jsfiddle.net/vzPUw/1/

Updated

http://jsfiddle.net/vzPUw/3/

In this, I changed in the markup because we never put block element inside an inline element. <a> is an inline element & h1 is a block element.

like image 89
sandeep Avatar answered Feb 02 '26 13:02

sandeep



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!