Hi,
A few people have asked how to make the menus align correctly in Zero Point. I was having the same problem and after a lot of trial and error, I've managed to fix the problem.
1) Disable the 'suckerfish' menus in the zero point theme menu
2) Download and install the 'nice menus' module in the /sites/all/modules folder
3) Copy the nice_menus_default.css file from the nice menus folder into your zeropoint/css folder (I renamed mine as nice_menus_custom.css)
4) Go to the themes/global configuration page and
) Remove this code from the page.tpl.php file (It will remove the standard primary menus):
<?php if (isset($primary_links)) { ?>
<?php if (theme_get_setting('menutype')== '0'): ?><div class="<?php print menupos() ?>"><?php print theme('links', $primary_links, array('class' =>'links', 'id' => 'navlist')); ?></div><?php endif; ?>
<?php if (theme_get_setting('menutype')== '1'): ?><div id="navlinks" class="<?php print menupos() ?>"><?php print $primary_links_tree; ?></div><?php endif; ?>
<?php } ?>
Comment | File | Size | Author |
---|---|---|---|
#1 | nice_menus.png | 333.53 KB | grimer |
Comments
Comment #1
grimer CreditAttribution: grimer commentedSorry - accidently saved and now I can't edit the issue, so things are a bit out of sequence:
4) Go to the themes/configure/global settings page and enter the path to the file you created in step 3 - e.g.
sites/all/themes/zeropoint/css/nice_menus_custom.css
5) Go to the blocks configuration page and enable the 'Nice Menu 1 (Nice Menu)' block. I placed mine in the header region. Click 'save' and then click 'configure' next to the newly enabled block. Set the 'Source Menu Tree:' = 'Primary Links' and 'menu style' = 'down'
6) Remove this code from the page.tpl.php file (It will remove the standard primary menus - you now have the 'nice menus' block so they are not needed):
7) Open the file you created in step 4 and edit the code to match the following. Please note that as this is posted code, it is not possible for me to highlight the changes. I suggest you compare this code with the original file created in step 4 to ascertain what I changed:
These changes will provide rounded menu corners and aligned menus. If you need to change the colours to suit your site, look for #006699 and #F7D000 in the code above.
I hope that helps.
Rob
Comment #2
glitz CreditAttribution: glitz commentedwill this work for the right side bar navigation menu. i got a menu on the right side bar that needs some help....
Comment #3
Florian CreditAttribution: Florian commentedgrimer, can we see your website? ... I am not quite sure I understand what you are saying above.
Comment #4
WildKitten CreditAttribution: WildKitten commentedI wrote simpler solution. If anyone still needs it, here it is. The only thing you need to do is to add it in your page.tpl.php in head tag. Also adjust first margin parameter for your need.
Comment #5
Florian CreditAttribution: Florian commentedUse the latest version of 0 Point (6.x-1.12) which is the more advanced, also. Version 6.x-2.25 uses the initial dropdown style for historical reasons.
Comment #6
vigic60 CreditAttribution: vigic60 commentedHallo,
I have updated my Zeropoint Theme, and now the "user" regions are aligned at the bottom, but I want them TOP aligned, as they were before. Please tell me how to make it, it looks very ugly now :-(
Comment #7
Florian CreditAttribution: Florian commentedTo align the user blocks at the top, put this line in custom-style.css:
Comment #8
aburnsni CreditAttribution: aburnsni commentedSub
Comment #9
Eduart CreditAttribution: Eduart commentedI'm using zeropoint Theme in one of my web sites,
when I going to validate the css in w3org, the validation tool found one error in the themes/zeropoint/css/style-zero.css?n
This is the report:
I'm come to the style-zero.css and this is the line 323 error reported:
The recomendation of w3org mention an error in the px definition:
'padding'
Value:
{1,4} | inherit
Initial: see individual properties
Applies to: all elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column
Inherited: no
Percentages: refer to width of containing block
Media: visual
Computed value: see individual properties
more detail here: http://www.w3.org/TR/CSS21/box.html#propdef-padding
This is the Example(s) from W3org:
The example above specifies a '1em' vertical padding ('padding-top' and 'padding-bottom') and a '2em' horizontal padding ('padding-right' and 'padding-left'). The 'em' unit is relative to the element's font size: '1em' is equal to the size of the font in use.
Someone have a short way to solve this?
Comment #10
snowmountain CreditAttribution: snowmountain commentedIn the code you reference,
what seems to be missing is the number for the pixels - how many pixels.
The line
padding: px;
could be modified to
padding: 10px;
or
padding: 3px;
etc. but it needs a number.
Comment #11
Florian CreditAttribution: Florian as a volunteer and commentedThis was fixed in versions 7.x-4.x and 6.x-4.x