Zii.widgets.cmenu - <Div Id="mainmenu">

Hi!

When using zii.widgets.CMenu it has to be placed inside a div with the id = mainmenu.

The id cant be anything else.(I have seen that in the blog-tuturial).

But it don’t say anywhere that it have to be inside a div with that id. How should anyone know that?

the code:

<div id="mainmenu">

<?php $this->widget(‘zii.widgets.CMenu’,array(

'items'=&gt;array(


	array('label'=&gt;'Mylabel1', 'url'=&gt;array('/showall1/index')),


	array('label'=&gt;'Mylabel2', 'url'=&gt;array('/showall2/index')),				


),

)); ?>

</div>

hope you can help me. Thank you.

I’m pretty sure it doesn’t need to be inside a div with the “mainmenu” ID. It’s just that the automatically generated stylesheet has a few lines which refer to a div with that ID. You can name the div ID something else if you want, but you’d have to style the menu correctly yourself.

Thanks to you I found the answer.

It has to be styled from /css/main.css #mainmenu:)