1 2012-05-08 16:35:38

Topic: html passing of default menu

Hi, firstly thank for the smooth intuitive CMS...the templating, block and snippets is just what I was looking for.  Big plus for having files automatically save to file name, I always edit with external editor so really nice (particularly the .chunk.php extensions where monstra automatically adds them to the back end.  I have used joomla, wordpress, expression engine and although ee is more flexible I plan to use monstra for all my small projects in the future.

ok my thanks and rant over....

I have a simple question: the default template parses the menu like this:

<div id="menu" class="eight columns">
<ul>
<li><a class="current" href="http://www.vincentstephens.co.uk/monstra/home">Home</a></li>
</ul>
</div>  
 

 

I need it to pass like this:

<li class="current"><a href="http://www.vincentstephens.co.uk/monstra/">Home</a></li>

simply put, to pass with class="current" on the <li> and not the <a>

2 2012-05-08 19:21:20

Re: html passing of default menu

vincentieo
try this -

#menu ul li + a.current {
some code
}

Re: html passing of default menu

El'Drako, thanks for the reply...I have never heard of combining selectors in that way with css before but apparently it is valid:

http://www.w3.org/TR/2001/CR-css3-selec … ombinators

I fixed the issue by rejigging the css so that I was styling the <a> element with padding and not the <li>, took a bit of fiddling but works fine now.  Not really sure why i didn't think of it before!?  Anyways, thanks for the reply. 

vince