HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[v7.0.1] Top Menu Dropdown

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#70328 (In Topic #14886)
Avatar

Community saint

I'm trying to figure where in global.css I need to be to tighten up the space between the menu options (see attachment).


Eric DeMars . com
My electronic portfolio and personal site. Uses ocPortal!
Back to the top
 
Posted
Rating:
#70330
Avatar

It's not in the CSS, it's in the template done by dividing 100% between the total number of menu items.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70333
Avatar

Community saint

Is there a way to change it in the header.tpl or whatever template I need to go to?

I have 6 menu items and the last one is being cut off. It should say "SHOES & ACCESSORIES", but it wants to drop ACCESSORIES to the next line.


Eric DeMars . com
My electronic portfolio and personal site. Uses ocPortal!
Back to the top
 
Posted
Rating:
#70336
Avatar

These top menus are a huge pain to style, because CSS has no way to flexibly divide up space, except using tables, which means either using a table tag (bad accessibility) or dropping IE6/7 support and using CSS ("display: table" and "display: table-cell").

If you have a fixed width theme it's not so bad because you can work out pixels precisely.
If that's what you want you'll need to edit MENU_BRANCH_dropdown and replace:

Code

{+START,IF,{$NOT,{LAST}}}style="width: {$DIV_FLOAT',99.5,{BRETHREN_COUNT}}%" {+END}
with something much more elaborate like:

Code

{$,{$EQ,{POSITION},0},style="width: 50px"}
{$,{$EQ,{POSITION},1},style="width: 50px"}
{$,{$EQ,{POSITION},2},style="width: 50px"}
{$,{$EQ,{POSITION},3},style="width: 50px"}
{$,{$EQ,{POSITION},4},style="width: 50px"}
{$,{$EQ,{POSITION},5},style="width: 50px"}
{$,{$EQ,{POSITION},6},style="width: 40px"}

Yuck ;).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70341
Avatar

Community saint

I did some rewording on menu item titles and got them all to fit. I was tempted to use a third-party dropdown menu script, but using the "edit menu:zone menu" option and adding through that is much quicker.

Eric DeMars . com
My electronic portfolio and personal site. Uses ocPortal!
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: