views:

565

answers:

1

I am using a sticky footer like described in:

I have a paragraph with a link that I want to be at the bottom of the page, so I put it in .footer.

The problem is that the link is not clickable in Firefox 3.5.2 and Chrome, it is behind .push. It does work in IE7 and IE8 but I guess that doesn´t say much.

I have toyed around with z-indexes but that does not work. By the way, I need the position:relative in #page to position some stuff inside that div.

Is there a way to make a link in .footer clickable in all browsers?

The relevant parts of the code:

css

html, body {
    height: 100%;
}
#page {
    width: 962px;
    text-align: left;
    min-height: 100%;
    /* sticky footer part */
    height: auto !important;
    height: 100%;
    margin: 0 auto -90px;
    /* end sticky footer */
    position: relative;
}
/* sticky footer part */
.push, .footer {
    height: 90px;
}
.push {
}
.footer {
    background: #181f18 url(../images/background-top.png) no-repeat center bottom;
}

html

<div id="page">
  <div id="wrapper">
    <div id="contents">bla bla</div>
  </div>
  <div id="footer">bla bla</div>
  <div class="push"></div>
</div>
<div class="footer">
    <p><a href="http://www.some-site.com/"&gt;Some Text</a></p>
</div>
A: 

Solved it, adding a postion:relative and z-indexes did it:

.push, .footer {
    height: 90px;
    position: relative;
}
.push {
    z-index: 9000;
}
.footer {
    background: #181f18 url(../images/background-top.png) no-repeat center bottom;
    z-index: 9999;
}
jeroen
To be cross browser compatible the push and footer classes also need to be position relative for the z-index to be recognized.