problem with activeCssClass

the following code:

<style type='text/css'>.fontWeightBold{font-weight:bold}</style>


echo \yii\widgets\Menu::widget([









give HTML OUTPUT as following

<style type='text/css'>.fontWeightBold{font-weight:bold}</style>


   <li><a href="/yii_basic_2_0_2/web/index.php?r=site%2Findex">Home</a></li>

   <li><a href="/yii_basic_2_0_2/web/index.php?r=site%2Fcontact">Contact</a></li>

   <li><a href="/yii_basic_2_0_2/web/index.php?r=site%2Fabout">About</a></li>


My Question: What is the effect of line (‘activeCssClass’=>‘fontWeightBold’,) on the code

I have used your code in my app.

activecssclass changes css of current url.

<li class="fontWeightBold"><a href="/yii2demo/site/contact">Contact</a></li>

so contact link get BOLD.



thanks, webin

my app version is 2.0.2

Is this the reason???

what is your version???

how do I contact link get BOLD??? I do not understand that .

thanks, webin

now, I understand what you mean .