WordPress.org

Ready to get started?Download WordPress

Forums

Adding css to a php command? ie. navigation menu (4 posts)

  1. rubbed
    Member
    Posted 2 years ago #

    I have this code

    <nav>
     <ul class="mainmenu">
      <li></li>
      <li></li>
      <li></li>
     </ul>
    </nav>

    And just replaced it with wordpress 3 menu so it is now:

    <nav>
    <?php wp_nav_menu(array('menu' => 'Main Nav Menu')); ?>
    </nav>

    My UL class "mainmenu" had some css to position the navigation list in a certain way etc.

    How do I apply this same css to the php command, or will I have to wrap it in a div within the nav tag with those same settings?

  2. rubbed
    Member
    Posted 2 years ago #

    Anyone? How do I edit the css of things like:
    <?php edit_post_link('Edit this entry','','.'); ?>

    ??

  3. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    for your menu problem: look through all the parameters of wp_nav_menu() http://codex.wordpress.org/Function_Reference/wp_nav_menu
    if you can't change the output, change the css.

    How do I edit the css of things like:
    <?php edit_post_link('Edit this entry','','.'); ?>

    you could wrap this code with a html tag, for instance a span with a css class;
    or use the css class which is output by the function:
    .post-edit-link

    try to work with a tool such as Firebug http://getfirebug.com/ to investigate the css.

  4. rubbed
    Member
    Posted 2 years ago #

    Thanks.

    is there a similar thing for chrome?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.