Sizing and Centering Menu

Forums Forums Menus Sizing and Centering Menu

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #812
    adiant
    Member

    I want to continue tweaking the CSS using the CSS Generator, and don’t want to be bothered with customizing the CSS everytime I do a Generate, so I found that this simple technique can be used to size and center the menu without touching the CSS file:

    echo ‘<table width="90%" align="center"><tr><td>’;
    if (function_exists(‘pixopoint_menu’)) {pixopoint_menu();};
    echo "</td></tr></table>";

    Simply adjust the Width percentage (90% in the example above) to get the desired width.

    #6197

    Thanks for the handy code tip for others <img decoding=” title=”Smiley” />

    I don’t think you want a semi-colon after the first closing brace (}) though.

    Something like the following would probably work for those who don’t want to add a non-semantical table into their page (I haven’t tested it though).

    [code:2xthhtmc]
    <div style="width:90%;margin:0 auto;">
    if (function_exists(‘pixopoint_menu’)) {pixopoint_menu();}
    </div>[/code:2xthhtmc]

    I have a new CSS generator under development which includes an option to a set a width and center the menu for you. It should be ready in a month or so hopefully.

    #6198
    adiant
    Member

    Thanks for the "better way".

    I think the added functionality you are planning for the CSS generator (width and center/centre the menu) might help a lot with "initial impressions" of a newbie CSS generator user for the WordPress plug-in.  The current default WordPress theme, when used with 100% width for the menu, has the menu "hanging over the sides".  Trying to find and change all the 100% width specifications in the generated CSS can be tedious if you take the usual number of tries (at least ten) at CSS generation before you get something you like.

    #6199

    The new system fixes a lot of problems people have had problems with. Another major feature is that you will be able to save your designs for later use, so you won’t need to rebuild your design if you want to modify/update it.

    #6200
    Anonymous
    Member

    I’m sorry, but how do you apply this code?

    #6201

    You add it to your WordPress theme where you want the menu code to be displayed.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.