[SOLVED] Unexpected formatting in my menu

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
Gillian.Hesse
Forum Members
Forum Members
Posts: 37
Joined: Thu Nov 08, 2007 1:29 pm

[SOLVED] Unexpected formatting in my menu

Post by Gillian.Hesse »

Hi there,

I am working on my first site and am modifying the style of my menu.  The menu is coming out exactly as I want except the currently selected menu item is formatted completely different from the rest of the menu.  I have attached a snapshot of the menu that shows the problem.

I am using the simple_navigation template and just modifying the style sheet.  It must be something I have done in my template or style sheet because the problem goes away if I change the page template to one of the defaults (i.e Left simple navigation + 1 column).

This is a snippet from my template where the menu is introduced

Code: Select all


<div id="left_column">

     <div id="menu_vert">
        {menu template="simple_navigation.tpl" collapse='1'}
   </div>

</div>

And a snippet from the stylesheet

Code: Select all

/* define layout of menu area (including news section) */
#left_column {
    clear: left;
    float: left;
    width: 200px; 
    margin: 0 0 10px 0;
    padding: 0;
}

/* define styling of the menu */
#menu_vert ul {
  list-style: none;
  width: 200px;
  padding: 0;
  font-size: 1.1em;
}

#menu_vert li {
  padding-top: 2px;
}

#menu_vert li ul{
  font-size:0.9em;
}

#menu_vert li li {
  text-indent: 20px;
  padding-top: 0px;
}


#menu_vert li  a {
  font-weight: bold;
  height: 20px;
  text-decoration: none;
  color: #505050;
  display: block;
  padding: 6px 0 0 10px;
  background: #f4f4f4;
  border-left: 4px solid #cccccc;
}

#menu_vert li a:hover {
  background: #eaeaea;
  color: #286ea0;
  border-left: 4px solid #286ea0;
}

Thanks

Gill
Attachments
menu_snapshot.jpg
Last edited by Gillian.Hesse on Sun Nov 18, 2007 12:49 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Unexpected formatting in my menu

Post by RonnyK »

Check the part with menuactive in the default stylesheets.
/* Styling the basic apperance of the active page elements (shows what page in the menu is being displayed) */
#primary-nav li.menuactive {
  background-color: #C7C7C7;
}
Ronny
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Unexpected formatting in my menu

Post by kermit »

that default menu template makes "currentpage" different than other menu items....



Navigation

Current page is 1: Home
2: CMSMS Works


1. you need to style #menu_vert li.currentpage h3 (note: no link) the same as your other menu items, OR
2. modify the menu template.. perhaps taking out the and making it a link like the rest of the menu.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
User avatar
Gillian.Hesse
Forum Members
Forum Members
Posts: 37
Joined: Thu Nov 08, 2007 1:29 pm

Re: Unexpected formatting in my menu

Post by Gillian.Hesse »

Thanks a lot for the pointers.

I don't really want to start playing around with menu templates yet.  I'm a bit too new at this.  So I tried out Kermit's first suggestion.
1. you need to style #menu_vert li.currentpage h3 (note: no link) the same as your other menu items,
That definitely helped.  But I couldn't get that current page element in the menu looking the same (especially the size of the coloured background region).

In the end I changed the default menu template I was using to "minimal_menu.tpl" which worked a treat - because it doesn't play around with the "currentpage" like the others do.

Thanks guys, I wouldn't have know what to look for in the default templates to work that out myself.

Gill
Post Reply

Return to “CMSMS Core”