Warna Hover & Background Menu

foto St. Khadijah Amin oleh @KhadijahAlra
1 bulan yang lalu
Assalamu alaikum. Gimana cara ubah warna hover menu (saat hover warna nya jadi abu2 gelap) dan warna background nya (orange jadi warna kuning seperti logo) yang sebelah kiri??? Berikut gambarnya. https://s2.postimg.org/x23yzx9pl/dashboard.png Mohon jawabannya. Terima Kasih.
Jawaban
foto muhammad ulul ajib oleh @ululajib
1 bulan yang lalu
kalo pakek css mungkin gitu revrensinya atau https://www.w3schools.com/
a:hover { 
    background-color: yellow;
}
foto Karis Maulana verified logo oleh @maulanakaris
1 bulan yang lalu
contohnya seperti code berikut :
li a:hover{
 color : grey; // warna tulisan berubah menjadi abu abu
 background-color : yellow; // latar belakangnya berubah menjadi kuning
}
foto St. Khadijah Amin oleh @KhadijahAlra
1 bulan yang lalu
Makasih atas jawabannya. koreksi : 1. abu2 maksud sy bukan warna tulisannya tapi background saat hover nya jadi abu2 gelap. berikut listing yg skrg.
<!-- Left Sidebar Menu -->
<div class="fixed-sidebar-left">
	<div class="bg-yellow">
			<div id=""	style="height: 130px; width: 130px; line-height: 100px; padding: 15px;" class="easy-pie-chart"><img src="<?= base_url() ?>assets/dist/img/pasikola.png" width="100%" height="100%" alt="" class="avatar img-circle" style="margin-left: 40%">
			</div>
		</div>
	<ul class="nav navbar-nav side-nav nicescroll-bar bg-yellow color-menu">
		<li class="mt-10">
			<?php $active_status = array("style"=>"color:#ffffff;");
			if($this->router->fetch_class()."/".$this->router->fetch_method() == "admin/dashboard")
				$active_status['class'] = "active";
			else
				$active_status['class'] = null;?>
			<?=anchor("admin/dashboard", "<i class='icon-speedometer mr-10 mt'></i> Dashboard", $active_status)?>
		</li>
		<li>
			<?php if($this->router->fetch_class() == "passenger")
				$active_status['class'] = "active";
			else
				$active_status['class'] = null;?>
			<?=anchor("passenger", "<i class='icon-map mr-10'></i> Atur rute", $active_status)?>
		</li>
		<li>
			<?php if($this->router->fetch_class() == "announcement")
				$active_status['class'] = "active"; 
			else
				$active_status['class'] = null;?>
			<?=anchor("announcement", "<i class='icon-cursor mr-10'></i> Posts", $active_status)?>
		</li>
		<li>
			<?php 
			$master_data = array("school", "student", "studentparent", "driver");
			$active_status = "";
			if(in_array($this->router->fetch_class(), $master_data))
			$active_status = "class='active'"; ?>
			<a <?=$active_status?> href="javascript:void(0);" data-toggle="collapse" data-target="#dashboard_dr" style="color:#ffffff";"><i class="icon-folder mr-10"></i>Master Data<span class="pull-right"><span class="label label-success mr-10"></span><i class="fa fa-fw fa-angle-down"></i></span></a>
			<ul id="dashboard_dr" class="collapse collapse-level-1">
				<li>
					<?php $active_status = array("style"=>"color:#ffffff;");
					if($this->router->fetch_class() == "school")
					$active_status['class'] = "active"; ?>
					<?=anchor("school", "<i class='icon-briefcase mr-10'></i> Sekolah", $active_status)?>
				</li>
				<li>
					<?php if($this->router->fetch_class() == "studentparent")
					$active_status['class'] = "active"; ?>
					<?=anchor("studentparent", "<i class='icon-user-female mr-10'></i> Orang Tua", $active_status)?>
				</li>
				<li>
					<?php if($this->router->fetch_class() == "student")
					$active_status['class'] = "active"; ?>
					<?=anchor("student", "<i class='icon-graduation mr-10'></i> Siswa", $active_status)?>
				</li>
				<li>
					<?php if($this->router->fetch_class() == "driver")
					$active_status['class'] = "active"; ?>
					<?=anchor("driver", "<i class='icon-support mr-10'></i> Pengemudi", $active_status)?>
				</li>
			</ul>
		</li>
	</ul>
</div>
<!-- /Left Sidebar Menu -->
foto Septian Dwicahya oleh @SeptianDwic
1 bulan yang lalu
Pake javascript gan lihat di https://www.w3schools.com

Login untuk diksusi di forum sekolah koding