Title: Custom menu CSS class stripping
Last modified: August 20, 2016

---

# Custom menu CSS class stripping

 *  [moose123](https://wordpress.org/support/users/moose123/)
 * (@moose123)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/custom-menu-css-class-stripping/)
 * Hi,
 * Running 3.2 multisite. One site is using custom menus. When I try to add a custom
   class to a menu item, it’s stripping out the CSS meta characters, so this…
 * `#menu-item-1256 {background url:(image.gif);}`
 * …becomes:
 * `menu-item-1256 backgroundurlimagegif`
 * I appreciate any suggestions.

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

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/custom-menu-css-class-stripping/#post-2252260)
 * are you putting that css into the menu class area?
 * That would definitely not work
 * You put the class in there…. if you wanted that item to be
 *     ```
       <li class="cheesecake">
       ```
   
 * you would put cheesecake in the class, to output that in the source
 * The css rules you have above go in style.css
 *  Thread Starter [moose123](https://wordpress.org/support/users/moose123/)
 * (@moose123)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/custom-menu-css-class-stripping/#post-2252264)
 * Ohhhhhhhhhhhh….duhhhhhh.
 * Ok, I get it now. Yes, I was putting the CSS code into the class field. Ok, this
   makes sense now. I’ll add the style to the CSS and just put the class name in
   the input field.
 * Thanks a ton for cluing me in.
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/custom-menu-css-class-stripping/#post-2252265)
 * You got it!!
 *  [ttj90](https://wordpress.org/support/users/ttj90/)
 * (@ttj90)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/custom-menu-css-class-stripping/#post-2252572)
 * May I ask what you did, I can’t quite grasp it myself.

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

The topic ‘Custom menu CSS class stripping’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [ttj90](https://wordpress.org/support/users/ttj90/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/custom-menu-css-class-stripping/#post-2252572)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
