How to link a specific div from another PHP page

6

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

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

How could you make this linkage?

    
asked by anonymous 25.11.2015 / 13:40

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 for the current folder. When the browser tries to load a style, for example href="batatinha.css" , it will actually try to get index.php/batatinha.css , because it will understand that the folder is index.php

The first thing to resolve is to remove the toolbar:

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

Or even

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

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

    
06.12.2015 / 02:59