Upon entering the index page, I have a navigation menu that directs me to every page on the website. Once I click and access a specific page, everything appears perfectly.
Navigation Code in index.html
<nav class="masthead-menu" id="masthead-menu">
<ul class="masthead-menu__list">
<li class="masthead-menu__item"><a class="current" href="index.html">Home</a></li>
<li class="masthead-menu__item"><a href="tratamientos.html">Tratamientos</a></li>
<li class="masthead-menu__item"><a href="profesionales.html">Profesionales</a></li>
<li class="masthead-menu__item"><a href="clinica.html">La Clínica</a></li>
<li class="masthead-menu__item"><a href="contacto.html">Contacto</a></li>
</ul>
</nav>
On the index page, there are several links leading to different tabs located on a separate tratamientos page.
Links Code in index.html
<article class="service">
<div class="service-content">
<h3 class="service-title">Implantología</h3>
<p class="service-excerpt">Loss of teeth can cause dental dysfunctions and serious oral health problems.</p>
<a href="tratamientos.html#tab-1" class="btn-link">Learn More</a>
</div>
<img src="images/implantologia_700.jpg" alt="Implantology" class="service-img">
</article>
... (similar blocks of code for other services)
The code structure within tratamientos.html is as follows:
<div class="tabs tabs--lg">
<ul class="tabs__list">
<li class="tabs__item tabs__item--active">
<a href="#tab-1" class="tabs__link">Implantología</a>
</li>
<li class="tabs__item">
<a href="#tab-2" class="tabs__link">Endodoncia</a>
</li>
..(similar tabs navigation for other services)
<p>I encounter an issue with scrolling when clicking through the links, as the tabs' navigation menu gets hidden behind the main page's navigation menu.</p>
<p>Below are images showing the current display (Image 1) and the desired appearance (Image 2).</p>
<p>To enable auto-scrolling upon loading only when clicking specific links, we will utilize the following Javascript code snippet:</p>
<pre><code>var app = {};
This script manages the tab functionality by toggling between different content areas based on link clicks. To trigger automatic scrolling on certain anchor links, further modifications may be needed in the JQuery function.
If assistance is required, the web page URL is available here: link