Styling items under section header
Styling items under section header
Using 1.10.2 and
{menu number_of_levels="1" template="minimal_menu.tpl"}
I have a vertical menu wih some Section Headers. I want to indent only the pages that come under the Section Headers and not the Home page and others.
I can do this easily in HTML but not sure how to do this in CMSMS.
Thanks
{menu number_of_levels="1" template="minimal_menu.tpl"}
I have a vertical menu wih some Section Headers. I want to indent only the pages that come under the Section Headers and not the Home page and others.
I can do this easily in HTML but not sure how to do this in CMSMS.
Thanks
Re: Styling items under section header
You could grab section headers in menu template and apply a style to them.
Example:
Try to use the class "sectionheader" which is already defined in default menu template.
Example:
Code: Select all
{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span>{$node->menutext}</span>
Re: Styling items under section header
Thanks nervino
Am not too familiar with editing templates if indeed that is what I am meant to do here. I can't even see where I can open the template I am using for the menu.
I have tried in the CSS:
.nav .sectionheader {padding-left: 10px;} but that just indents the actual section header which is not what I want as the links below don't move with the sectionheader.
I tried .nav .sectionheader ul li a but that didn't work and also
.nav ul li a .sectionheader.
Thanks.
Am not too familiar with editing templates if indeed that is what I am meant to do here. I can't even see where I can open the template I am using for the menu.
I have tried in the CSS:
.nav .sectionheader {padding-left: 10px;} but that just indents the actual section header which is not what I want as the links below don't move with the sectionheader.
I tried .nav .sectionheader ul li a but that didn't work and also
.nav ul li a .sectionheader.
Thanks.
Re: Styling items under section header
Try...
.sectionheader li {margin-left: 10px}
.sectionheader li {margin-left: 10px}
Re: Styling items under section header
Thanks Dr.CSS but it didn't work.
Tried .nav .sectionheader and just .sectionheader with li, li a and ul li a.
Tried .nav .sectionheader and just .sectionheader with li, li a and ul li a.
Re: Styling items under section header
It really helps to have a link to the page in question...
Re: Styling items under section header
You don't have any children under the section headers they are just section separators...
You either need to customize the menu to add a page alias class or...
You either need to customize the menu to add a page alias class or...
Re: Styling items under section header
Thanks ! Yes, I did read something about child classes in the Documentation for menus - will go back and see if I can understand it this time, now that I know what is required
Thanks!
Thanks!
Re: Styling items under section header
I would just put all the ones under the section header as children under the sectionheaders then doing what you want with CSS is easy, like I posted earlier...
Re: Styling items under section header
So even though the section headers are not pages, I make them the parent of the individual pages? Is that what you are saying?
I don't think that is what you meant as it wouldn't work.
Or add something to the menu template? Not sure what though.
I don't think that is what you meant as it wouldn't work.
Or add something to the menu template? Not sure what though.
Last edited by jasnick on Sun Dec 25, 2011 1:52 am, edited 1 time in total.
Re: Styling items under section header
Yes, that way you can target them, that's actually the idea behind section headers...
Re: Styling items under section header
I think our posts crossed - what is it that I should be doing - I don't know php so don't know what to put in the template...
Re: Styling items under section header
In admin of site go to Content > Pages and hit the reorder pages link, move the pages under the section headers where wanted, hit submit...
Re: Styling items under section header
Yes just noticed that and have fixed it