Title: Adding css to a php command? ie. navigation menu
Last modified: August 20, 2016

---

# Adding css to a php command? ie. navigation menu

 *  [rubbed](https://wordpress.org/support/users/rubbed/)
 * (@rubbed)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-a-php-command-ie-navigation-menu/)
 * 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?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [rubbed](https://wordpress.org/support/users/rubbed/)
 * (@rubbed)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-a-php-command-ie-navigation-menu/#post-2601182)
 * Anyone? How do I edit the css of things like:
    <?php edit_post_link(‘Edit this
   entry’,”,’.’); ?>
 * ??
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-a-php-command-ie-navigation-menu/#post-2601192)
 * for your menu problem: look through all the parameters of `wp_nav_menu()` [http://codex.wordpress.org/Function_Reference/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/](http://getfirebug.com/)
   to investigate the css.
 *  Thread Starter [rubbed](https://wordpress.org/support/users/rubbed/)
 * (@rubbed)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-a-php-command-ie-navigation-menu/#post-2601195)
 * Thanks.
 * is there a similar thing for chrome?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding css to a php command? ie. navigation menu’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [rubbed](https://wordpress.org/support/users/rubbed/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-a-php-command-ie-navigation-menu/#post-2601195)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
