Why does the page jump after redirecting?

I ran into a problem that I cannot solve. Could you help me.

I have different information pages, and at the end there is the following link:

"You may find more pictures in our <a href="ga.php#apco">GALLERY</a>" 

It jumps to the gallery page and to the right, but if all the pictures are uploaded, it jumps up. I would like to avoid this jump!

Part of the php gallery:

  <div class="products-section"> <div id="apco">Apartment Concept</div> <div class="products-grids"> <div class="col-md-4 products-grid"> <div class="gallery"> <a class="mask" href="../data/pic/22.jpg"><img src="../data/pic/22.jpg" class="img-responsive zoom-img" alt="/" title="Apartment"></a> </div> </div> 

...

I also use jQuery because of the design. Please help me and clarify the problem. I am a newbie-intermediate user of HTML-PHP and mostly work from templates.

Thanks!

+5
source share
2 answers

I have the habit of using a tag anchor for a link when I want this navigation. You can even embed h1 or something else in it.

i.e.

  a(id="apco") h1 someText 

Never let me down, I think some teacher had beaten him in me a long time ago.

Hope this works for you!

+1
source

Remove #apco in the tag.

So,

 "You may find more pictures in our <a href="ga.php">GALLERY</a>" 
0
source

All Articles