How to link a specific div from another PHP page

Asked

Viewed 637 times

6

I have a one page site, where I have an external page with a menu, and the same needs to link the DIVS of my home (one page). Example: On my external page, when clicking on the Videos menu, I will go to Div of the One Page page.

When I try to link like this <a href="index.php/#agency-split">Vídeo</a>, the one page loads fully without style.

How could I link?

  • 2

    See if you can find it http://answall.com/questions/6626/howto create a-site-sem-reloade-a-cada-clique-num-link/6634#6634

1 answer

4


The page loads without style because of the extra bar in the address:

<a href="index.php/#agency-split">Vídeo</a>
                  ^----- esta barra não deveria estar aqui

You probably have style sheets relative to the current folder. When the browser tries to load a style, for example href="batatinha.css", he’s actually gonna try to pick up from index.php/batatinha.css, because you will understand that the folder is index.php

The first thing to resolve is to remove the bar:

<a href="index.php#agency-split">Vídeo</a>

Or even

<a href="/#agency-split">Vídeo</a>

This second case only if the index.php is the root of the site.

  • Thanks for the reply! I got the solution with this your post!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.