How do I horizontally center this Nice Menu module?
blackout - October 9, 2006 - 00:25
My first post here so hi everyone!
I'm trying to find a CMS that will take over from my old Postnuke site and I think I may have found it :)
I'm not an expert on php or css, but I've searched and searched until I am blue in the face and I really need to know how to center this Nice Menu thing. I'm running the kurbick theme. I've specified it's a header in the blocks admin but it wont go over the right blocks. It goes to the top but stays to the left and then doubles up on another line, instead of continuing over to the far right. It's like the right blocks are stopping it.
Any ideas what I'm doing wrong????
Massive thanks in advance :)

You're going to need to know
You're going to need to know CSS for this one. Either that or post a link to the site so others can help you.
Oh dear. You see the problem
Oh dear. You see the problem is we've have had a massive attack on the server and I'm redesigning the whole site in drupal on my localhost so that it can go up once the server is back up. I can't send you any links unfortunately. Damn this is frustrating.
OK I can't do this then. Shame cause it's a lovely menu and could easily do exactly what I need it to do. So what I'm doing now is trying to sort this menu structure out with primary links across the top and blocks as sub-menus instead of this nice_menu. Long way round I know, but it's the only option I have :(
I just desperately need a basic good looking site up in the next few days as our community is massive and without a home....
I suppose I can add the bells and whistles later. I definitely want this nice menu up there at some point. If anyone has any quick css fixes, I'd be sooo bloody grateful but if not, I'll come back to this post and try to get to the bottom of css at some point in the future :)
Thanks so much for your reply mate.
I haven't looked at
I haven't looked at nicemenus but it is possible to add another region using php, then place your nicemenus into that region. See this for details, it might look a tad daunting if you haven't done much coding, but it's pretty easy, just follow instructions exactly to create a template.php file, substituting kubrick_regions for mytheme_regions and adding a region called 'topmenu.'
Then place this:
<div id="topmenu"><?php print $topmenu ?></div>right before the header div in the page.tpl.php file of your Kubrick theme.
Then add the css governing your new div's width etc to your style.css for Kubrick and you're set. If you give your new region the ID "topmenu" for instance (as above), the css line would be
#topmenu {width: 100%; }good luck!
I sort of understand what
I sort of understand what you mean there but today I sorted out the menu using primary links and sub menu blocks so I will come back to this as soon as my site is live and reply as I really want to get this nice menu up at some point.
Many many thanks though for your help so far...
There was css overiding hapening in my theme
I was having the same problem and tried all sorts of different tactics, but the solution to centering nice_menu for me was in the css for my theme:
#header-region {
/* removed other stuff in here to show the stuff that counts */
margin: 0px auto;
text-align: center;
}
#header-region .block {
display: block;
/* I had to uncomment this to get it to work */
/* margin: 0 1em; */
}
/* this is the id generated for the menu I am using */
#block-nice_menus-1 {
margin: 0 auto;
position: relative;
/* I had to also determine the size of my menu as well */
width: 486px;
}
maybe someone can tell me if there is a way around specifying the exact size of the menu, it just doesn't seem to be good coding ractice to me, but I couldn't find another way around it.
==
hackbloc.org : exploit code not people