Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Is there a way to centre the navigation menu? It seems to always be left justified? |
||||
|
Select it and click on the "center text" button, that should do the trick. To make it look more centered, make its background invisible and put it centered into a container. Then set the color of the container to the one you like it to have. |
||||
|
That doesn't seem to do it quite right. I think I have to manually adjust the width in px on the container, and then centre the container, but there doesn't seem to be a way to have the nav menu set to just keep all the options centred, even after you add or remove some... |
||||
|
Try the "Nature Water" template (the first one) in RocketCake. That navigation menu is centered, and it's done exactly as erik described. Doesn't this work for you? |
||||
|
Yes, but if you add another item to that menu, it will be truncated, because the nature water navigation menu is specifically set at 336, 34 for sizing. Otherwise I have to add items, then estimate how wide they are and keep adjusting the width of the menu to fit what I've put up as options... I was expecting (maybe too high an expectation? It's easy for me to imagine what I want!) that I would be able to just add items as needed, and it would have an "automatic" width and be able to keep all the items centred, much as if I were simply typing text that I had set to always be centred. Does that make more sense? Just wait until my next round of questions! |
||||
|
I'm getting closer! If on the navigation menu itself, I edit the HTML and add some CSS like so: display: block; margin-left: auto; margin-right: auto; width: 940px; I can get it to centre itself without it having to be in a another container. About the only thing left is to figure out how to pad it out to 100% so that the background doesn't show at each end. Cheers! |
||||
|
Just talking to myself here, or a future person wanting to do the same... I noticed that by forcing my menu to be 940px, that causes the weird effect on mobile of having a blank scrollable area off to the right. I was able to correct this issue by simply setting the Max-Width of the menu to be 100%. I guess when it switches to mobile, it ignores my block command. Sweet. As for the bigger picture, I also think I have another solution to centre a navigation menu AND have it cover 100% of the width - just make a navigation menu that's manually populated for mobile and empty for everything else. Then fill the rest of that container with small text boxes and just link the boxes individually. Don't even really use the navigation menu built-in to RocketCake... Sorry if I'm rambling. I just want to pay forward anything I discover to the next person. |
||||
|
Yes, basically best is to set a width at which it is best to switch to the mobile menu and then use just that. Other more complex dynamic swtiching can be achieved like you try to, I guess, but it's more complicated as you see. Will see if I can improve the navigation menu a bit into that direction for the next major update. |
||||
|
Sounds great! I know I figured out the sticky navigation so it doesn't have to start at the top, but maybe you could add that as an option in properties for future versions so people wouldn't have to do the CSS tricks - it seems like there has been some interest in that ability. |
||||
|
Yes, I know this has been a thorn in my side for months. It's one of many inadequacies in Rocketcake, honestly. |
|