mani rajput
mani rajput

Reputation: 73

z-index is not working in css

Hello everyone. I have designed a website in which I have a fixed header. The website is basically for a DJ. I have developed this website in ASP.net. I am having some problems with this website. I fixed the header but the other content is now appearing in front of the header, instead of behind it. Please see the website below for how it currently appears.

http://www.spin69.com/Default.aspx

I use z-index in css but it did not work. Could you please tell me what I have to do to fix this and where my css is wrong. I am basically a developer. I designed this website using a website template which I downloaded from the internet.

Upvotes: 0

Views: 87

Answers (4)

Dhanith Suryavansi
Dhanith Suryavansi

Reputation: 29

Add Z-index to header

header {
background-color: #000000;
height: 160px;
left: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 99999;

}

Upvotes: 0

jitender
jitender

Reputation: 33

please use z-index with position.

Upvotes: 0

tommy knocker
tommy knocker

Reputation: 371

set h1's z-index:100; or anything above 3

the header has no z-index defined at the moment

Upvotes: 0

Albzi
Albzi

Reputation: 15609

Change header height to 180px (or decrease h1 height) and give header a z-index:100;.

EDIT: The only reason I've used z-index:100; is because you've said that you used a website template, which could have already used some z-index styles, so I'm guessing 100 would put it on top.

Upvotes: 2

Related Questions