Css Color menu Wordpress -
i have issue background on menu each category through css example in picture below. wordpress.
background 1 category:
background 2 category:
if have name on menu sport make sport background colors love through css in wordpress.
you can use javascript
code in case insert header.php
or similar
<script type="text/javascript"> $( document ).ready(function() { var test = document.getelementbyid("menu-item-26"); var check_exist = test.classlist.contains("current-menu-item"); if(check_exist){ var x = document.getelementsbyclassname("header"); x[0].style.backgroundcolor="#333"; } }); </script>
change
menu-item-26
id_of_your_menu
keep
current-menu-item
because when menu selected class added in menuchange
header
class class want change background.set color.
that's all.
my result
original
Thanks for give us valuable information
ReplyDeleteWordPress Support
WP Support
Very Helpful. Thanks for such Information
ReplyDelete24x7 WP Support
WP Tech Support