
Any way to light up only the part showed in the picture? or change the color to make it different from the others?
Websitesachin6609 wrote: ↑Wed Nov 22, 2017 1:58 pmHello
Yes It is possible by some css tricks let me share the url i will Give you the css changes to do That
Thanks
Sachin
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
i already checked but i dont understand it :/, thx anyway!kestas wrote: ↑Wed Nov 22, 2017 4:00 pmHi
There are some tutorial:
https://stackoverflow.com/questions/268 ... rrent-page
Regarding this tutorial you should edit your stylesheet.css
and catalog/view/theme/default/template/common/header.tpl (or header.twig if OpenCart is 3 version).
Good Luck
Code: Select all
#menu .nav > li > a {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
padding: 10px 15px 10px 15px;
min-height: 15px;
background-color: transparent;
}
Code: Select all
#menu .nav > li > a.active-page {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
padding: 10px 15px 10px 15px;
min-height: 15px;
background-color: #a94442;
}
is your color you can change.background-color: #a94442;
Code: Select all
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a>
Code: Select all
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle active-page" data-toggle="dropdown"><?php echo $category['name']; ?></a>
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
#menu .nav > li > a {kestas wrote: ↑Wed Nov 22, 2017 4:59 pmok
find your theme stylesheet.css open in some text editor like notepad or notepad++
find the code:below add:Code: Select all
#menu .nav > li > a { color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); padding: 10px 15px 10px 15px; min-height: 15px; background-color: transparent; }
whereCode: Select all
#menu .nav > li > a.active-page { color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); padding: 10px 15px 10px 15px; min-height: 15px; background-color: #a94442; }
is your color you can change.background-color: #a94442;
next open in text editor catalog/view/theme/YOUR-THEME/template/common/header.tpl
find:change to:Code: Select all
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a>
I have not tried, but it should work...Code: Select all
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle active-page" data-toggle="dropdown"><?php echo $category['name']; ?></a>
Good Luck
Code: Select all
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a>
Code: Select all
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle active-page" data-toggle="dropdown"><?php echo $category['name']; ?></a>
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
i did just now but nothing changedkestas wrote: ↑Wed Nov 22, 2017 5:21 pmyou did not do all
you need replace this line in your header.tpl
with this one:Code: Select all
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a>
because I have checked in your site and did not found this class="dropdown-toggle active-page" class where is active page defined.Code: Select all
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle active-page" data-toggle="dropdown"><?php echo $category['name']; ?></a>
add this script:<?php } ?>
Code: Select all
<script>
$(document).ready(function() {
var url = window.location.href;
$("#menu a").each(function() {
if(url == (this.href)) {
$(this).parents("li:last").addClass("active");
}
});
});
</script>
Code: Select all
#menu .nav > li.active > a {
background-color: lightblue;
}
is your color you can change to your desired.lightblue
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
Users browsing this forum: No registered users and 4 guests