Link to a div on another page does not work

1

I have this code:

<div id="text"><p>A Intertráfego está disponível a ser alcançada a qualquer momento.
Saiba <a href="pedir_cotacao.html#map">onde estamos</a> e <a
href="pedir_cotacao.html#otherQuestion"> os nossos contactos </a></p></div>

The problem is that the link to the map does not work, it changes to the correct page but not to the div I want, and the other link (ask_collection # otherQuestion) works perfectly, I've even tried an invisible div over the map and for the link to this div and tb does not give. Any tips? Obgado

    
asked by anonymous 26.03.2014 / 13:22

1 answer

2

What prevents you from being positioned correctly is the CSS position: relative property. Put the 2 elements as position: static , or without this setting, since static is the default.

#otherQuestion {
    /*position: relative; -> Remova */
    float: left;
    height: 450px;
    width: 100%;
    border-top: 2px solid #1a1a1a;
}
#map {
    /*position: fixed; - Remova */
    width: 100%;
    height: 450px;
    /*bottom: 0; -> tb desnecessário */
    border: 0;
}

HTML:

<div id="map" style="background-color: rgb(229, 227, 223); overflow: hidden; -webkit-transform: translateZ(0px);">
    
26.03.2014 / 14:48