单击菜单链接时带有滚动条的左侧菜单,然后滚动条移动不显示所单击菜单附近的滚动条。 正如您在w3schools网站上看到的那样,单击侧面菜单后,滚动条再次位于我们单击的菜单上的相同位置。我想要与显示菜单列表相同的工作,其中带有列表项的标签
代码:
.scroll_text_menu {
height: 640px;
overflow-y: scroll;
line-height: 1px;
}
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu ">
<div class="menu_section">
<h3><a href="<?php echo base_url(); ?>dashboard">Dashboard</a></h3>
<?php
$userType = $this->session->userData('userType');
?>
<ul class="nav side-menu scroll_text_menu">
<?php if ($userType == 1) { ?>
<li>
<a href="<?php echo base_url(); ?>account"><i class="fa fa-bank"></i> Account Management </a>
</li>
<li>
<a href="<?php echo base_url(); ?>Training_program_exercise"><i class="fa fa-file-text" ></i> Training Program</a>
</li>
<?php } ?>
<?php if (in_array($userType, array("1", "2"))) { ?>
<li>
<a href="<?php echo base_url(); ?>coach"><i class="fa fa-user-md" style="font-size:19px"></i> Coach Management </a>
</li>
<?php } ?>
<?php if (in_array($userType, array("1", "2", "3"))) { ?>
<li>
<a href="<?php echo base_url(); ?>Athlete1"><i class="fa fa-user" ></i> Athlete Management </a>
</li>
<li>
<a href="<?php echo base_url(); ?>team"><i class="fa fa-users" style="font-size: 17px;"></i> Team Management </a>
</li>
<li>
<a href="<?php echo base_url(); ?>Index/exercise_parent_type"><i class="fa fa-houzz" style="font-size:20px"></i> Exercise Parent Type</a>
</li>
<li>
<a href="<?php echo base_url(); ?>Index/exercise_type"><i class="fa fa-th-large" aria-hidden="true"></i> Exercise Types</a>
</li>
<li>
<a href="<?php echo base_url(); ?>Athlete_exercise"><i class="fa fa-wheelchair-alt"></i> Exercise </a>
</li>
<li>
<a href="<?php echo base_url(); ?>Index/Exercise_sets"><i class="fa fa-columns" aria-hidden="true"></i> Exercise Sets</a>
</li>
<li>
<a href="<?php echo base_url(); ?>training"><i class="fa fa-users" style="font-size: 17px"></i> Training Plan </a>
</li>
<li>
<a href="<?php echo base_url(); ?>Index/Planprograms"><i class="fa fa-map-o" style="font-size: 17px"></i> Programs Plans</a>
</li>
<li>
<a href="<?php echo base_url(); ?>Index/privacyPolicySelect"><i class="fa fa-lock" ></i> Privacy Policy</a>
</li>
<li>
<a href="<?php echo base_url(); ?>Index/selectQquestion"><i class="fa fa-question-circle-o" aria-hidden="true" ></i><span > Questionnaire</span></a>
</li>
<li>
<a href="<?php echo base_url(); ?>Index/answers"><i class="fa fa-file-text-o"></i> User Answer</a>
</li>
<li>
<a href="<?php echo base_url(); ?>School"><i class="fa fa-building-o" ></i> School</a>
</li>
<li>
<a href="<?php echo base_url(); ?>Index/Position_title"><i class="fa fa-newspaper-o" aria-hidden="true" ></i> Position Title</a>
</li>
<li>
<a href="<?php echo base_url(); ?>Index/Sports"><i class="fa fa-futbol-o" ></i> Sports</a>
</li>
<li>
<a href="<?php echo base_url(); ?>Index/Language"><i class="fa fa-language"></i> Languages</a>
</li>
<?php } ?>
<?php } ?>
</ul>
</div>
</div>