link to a specific part of another file from a link to


I have a button that redirects to another page of my website. But I want you not to send me to the top, but to a specific part of the file. I'm placing the id in the href , but it does not take it (when I take the id it redirects perfectly, so the route is the correct one, but on top). What can it be?

This is the link

<li><a href="cumples_y_eventos.html/#mesas">MESAS DULCES</a></li>

And this is the element where I want it to appear

<article class="articulo">
    <div class="diseños" >
        <figure id="mesas" class="ejemploDiseños"><img src="imagenes/el punto logo.jpg" alt=""></figure>
        <div class="subeInfo">
           <h4>Mesas dulces</h4><h3>divertidas</h3>
           <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.adipisicing Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
asked by Fernanda 10.09.2018 в 14:15

1 answer


You have to delete the backslash from the url to work for you:

<li><a href="cumples_y_eventos.html#mesas">MESAS DULCES</a></li>

This is because with the slash it is interpreted as one more route.

answered by 10.09.2018 / 14:38