0
good morning!
I’m a beginner in HTML and CSS. I created a web page where I basically have the navigation menu and I have the other pages in separate files. I would like that by clicking on a menu option the page would be updated and the navigation menu would remain available, that is, on any page I visit the menu will be there for navigation to happen. If I had used frames, it would be enough to have the page loaded in the "content" frame, but I do not use frame and Divs. I’ve been researching the subject and realized that I need to load the pages in mine. However, as I said, I’m a beginner in HTML and CSS and have no idea how to do it. Could someone help me with this obstacle?
Below the code, only the BODY tag for you to understand the context.
<body>
<div id="cssmenu">
<ul>
<li class='active has-sub'>
<a href='#'>
<span>
Processo CMD
</span>
</a>
<ul>
<li class='has-sub'><a href='#'><span>Sourcing</span></a>
<ul>
<li>
<a href="">
<span>
Dúvidas de Processos
</span>
</a>
</li>
<li class='last'>
<a href='#'>
<span>
???
</span>
</a>
</li>
</ul>
</li>
<li class='has-sub'><a href='#'><span>Aprovações</span></a>
<ul>
<li><a href='#'><span>Peças</span></a></li>
<li class='last'><a href='#'><span>Invest. Buy</span></a></li>
</ul>
</li>
<li class='has-sub'><a href='#'><span>Excessões</span></a>
<ul>
<li class='has-sub'>
<a href='#'>
<span>
Exclusividade
</span>
</a>
<ul>
<li>
<a href='#'>
<span>
Aprovações
</span>
</a>
</li>
<li class='last'>
<a href='#'>
<span>
???
</span>
</a>
</li>
</ul>
</li>
<li class='has-sub'>
<a href='#'>
<span>
Capacidade Produtiva
</span>
</a>
<ul>
<li>
<a href='#'>
<span>
???
</span>
</a>
</li>
<li class='last'>
<a href='#'>
<span>
???
</span>
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class='active has-sub'>
<a href='#'>
<span>
Processo CMI
</span>
</a>
<ul>
<li class='has-sub'><a href='#'><span>Sourcing</span></a>
<ul>
<li>
<a href='#'>
<span>
Dúvidas de Processos
</span>
</a>
</li>
<li class='last'>
<a href='#'>
<span>
???
</span>
</a>
</li>
</ul>
</li>
<li class='has-sub'><a href='#'><span>Aprovações</span></a>
<ul>
<li><a href='#'><span>Peças</span></a></li>
<li class='last'><a href='#'><span>Invest. Buy</span></a></li>
</ul>
</li>
<li class='has-sub'><a href='#'><span>Excessões</span></a>
<ul>
<li class='has-sub'>
<a href='#'>
<span>
Exclusividade
</span>
</a>
<ul>
<li>
<a href='#'>
<span>
Aprovações
</span>
</a>
</li>
<li class='last'>
<a href='#'>
<span>
???
</span>
</a>
</li>
</ul>
</li>
<li class='has-sub'>
<a href='#'>
<span>
Capacidade Produtiva
</span>
</a>
<ul>
<li>
<a href='#'>
<span>
???
</span>
</a>
</li>
<li class='last'>
<a href='#'>
<span>
???
</span>
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class='active has-sub'>
<a href='#'>
<span>
Géberson
</span>
</a>
<ul>
<li class='has-sub'><a href='#'><span>Sourcing</span></a>
<ul>
<li>
<a href='#'>
<span>
Dúvidas de Processos
</span>
</a>
</li>
<li class='last'>
<a href='#'>
<span>
???
</span>
</a>
</li>
</ul>
</li>
<li class='has-sub'><a href='#'><span>Aprovações</span></a>
<ul>
<li><a href='#'><span>Peças</span></a></li>
<li class='last'><a href='#'><span>Invest. Buy</span></a></li>
</ul>
</li>
<li class='has-sub'><a href='#'><span>Excessões</span></a>
<ul>
<li class='has-sub'>
<a href='#'>
<span>
Exclusividade
</span>
</a>
<ul>
<li>
<a href='#'>
<span>
Aprovações
</span>
</a>
</li>
<li class='last'>
<a href='#'>
<span>
???
</span>
</a>
</li>
</ul>
</li>
<li class='has-sub'>
<a href='#'>
<span>
Capacidade Produtiva
</span>
</a>
<ul>
<li>
<a href='#'>
<span>
???
</span>
</a>
</li>
<li class='last'>
<a href='#'>
<span>
???
</span>
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class='last'>
<a href='#'>
<span>
Géberson R
</span>
</a>
</li>
</ul>
</div>
<div id="conteudo">
</body>
Do you want to use the menu in several other places? Create it in a separate file and call it where needed. Example:
require menu.html
(in this case using php). If you want to use Jquery you can use the functionload
https://api.jquery.com/load/.– Rafael Withoeft
Géberson: I closed the question as duplicate because I think you’ll find an answer there in the other question. If you have specific problems at any step of the implementation you can put a new question showing the code you made and explaining where it went wrong.
– Sergio
Géberson these answers answered him?
– Ricardo