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
http://www.led-biz.com
you mean this?
Hi
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
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
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
ok
find your theme stylesheet.css open in some text editor like notepad or notepad++
find the code:
below add:
where
next open in text editor catalog/view/theme/YOUR-THEME/template/common/header.tpl
find:
change to:
I have not tried, but it should work...
Good Luck
find your theme stylesheet.css open in some text editor like notepad or notepad++
find the code:
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;
next open in text editor catalog/view/theme/YOUR-THEME/template/common/header.tpl
find:
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>
Good Luck
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
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
padding: 10px 15px 10px 15px;
min-height: 15px;
background-color: transparent;
}
#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;
}
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a>
i did as you wrote but nothing changed, any other ideas? anyway thx for the time helping me out!
I only want one button to be always lighted up not all
you did not do all
you need replace this line in your header.tpl
with this one:
because I have checked in your site and did not found this class="dropdown-toggle active-page" class where is active page defined.
Or maybe your header.tpl is not default. so to help I need your header.tpl file
you can write me PM
you need replace this line in your header.tpl
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>
Or maybe your header.tpl is not default. so to help I need your header.tpl file
you can write me PM
Last edited by kestas on Wed Nov 22, 2017 5:24 pm, edited 1 time in total.
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>
The first post with suggestions was wrong.
I just checked and this is working solution
So in your catalog/view/theme/default/template/common/header.tpl in the end of the file after last
and in your stylesheet.css file add:
where
I just checked and this is working solution
So in your catalog/view/theme/default/template/common/header.tpl in the end of the file after last
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
Who is online
Users browsing this forum: No registered users and 98 guests