How i get an HTML button to go to a different page inside my own page?

27 views Asked by At

Well, i want to get an effect that, when i clikc a section of my HTML top buttons, the page jump to a new page (inside of my own page), but only change the body, foot... and remain the top.

Like this example:

https://albertoanayamusic.com/

When you click a section, just change the middle part of the webpage.

Thanks!

1

There are 1 answers

1
fraggley On BEST ANSWER

I think you misunderstand what is happening on the example site you have provided. When you click on a link it is going to a different page. What you are seeing is a fixed background so it just looks like only the body content is changing.

You can achieve this with some CSS:

body {
    background-image: url("background.jpg");
    background-repeat: no-repeat;
    background-attachment: fixed;
}