[SOLVED] Href not working?

Hi everyone,

I wanted to add a little feature to my webpage, where I have the banners, so that just by click redirect to another webpage, but it´s not working the code, when it should be really simple and I don´t understand why. The code is just:

        <div class="contenedor_banner">
            <div class="banner">
                <a href="http://www.xboxers.es"><img src="imagenes/banner_xboxers.png"/></a>

I have tried also with “onclick” used on the div (without <a> element) but also doesn´t work.

Thanks in advice.

I don’t see any reason in the html why it would not work.
All I can think of is if there were something covering the link via css, like a pseudo or other element placed over it.

I´m giving the following style to the “banner” class but is not working:

outline: 4px solid red;

The site of the webpage is this:

But I don´t see anything extrange.

On that page the banner is missing the <a> element.

        <div class="contenedor_banner">
            <div class="banner">
                <img src="imagenes/banner_xboxone.png"/>


There is no link.

Sorry, what I want to add is that feature, just clicking on the banner be redirected to another webpage. The code I have shared in this post is just the code I have written in local.

But I cannot make it run.

The class .contenedor_banner has a z-index of -2 which is forcing it to the back, making its contents unclickable.


Solved removing z-index.

Thanks a lot! :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.