Title: CSS on sidebar
Last modified: August 21, 2016

---

# CSS on sidebar

 *  [Krdm](https://wordpress.org/support/users/krdm/)
 * (@krdm)
 * [12 years ago](https://wordpress.org/support/topic/css-on-sidebar/)
 * Hello,
 * I want to change the css of one sidebar. To edit the css of one sidebar I will
   need the id, which is why I looked it up in the functions.php file.
 * register_sidebar(array(
    ‘name’ => ‘SlidingBar Widget 4’, ‘id’ => ‘slidingbar-
   widget-4’, ‘before_widget’ => ‘<div id=”%1$s” class=”slidingbar-widget-col %2
   $s”>’, ‘after_widget’ => ‘<div style=”clear:both;”></div></div>’, ‘before_title’
   => ‘<h3>’, ‘after_title’ => ‘</h3>’, ));
 * Since I can´t use the id ´slidingbar-widget-4 (Tried that, didn’t work), is it
   possible to change the before_widget id to: ‘before_widget’ => ‘<div id=”slidingbar-
   widget-4″ (because that seemed to work) without losing it after updates? So if
   I change the id and update my theme, will the id stay the same or will it change
   back to what it was?
 * Thanks! I Really appreciate the help!

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years ago](https://wordpress.org/support/topic/css-on-sidebar/#post-4848056)
 * What theme are you using? Where did you download it from?
 *  [leapoahead](https://wordpress.org/support/users/leapoahead/)
 * (@leapoahead)
 * [12 years ago](https://wordpress.org/support/topic/css-on-sidebar/#post-4848061)
 * Hi, you can use [Child Themes](https://codex.wordpress.org/Child_Themes), so 
   it is safe do work out your own sidebar style sheet instead of overriding it.
   Does this solve your pain?
 *  Thread Starter [Krdm](https://wordpress.org/support/users/krdm/)
 * (@krdm)
 * [12 years ago](https://wordpress.org/support/topic/css-on-sidebar/#post-4848062)
 * I’m using Avada, downloaded it from themefusion. I did make a child theme and
   I know it’s possible to create a new sidebar in a child functions.php and use
   the id to change the css, just wondering if it’s also possible to edit the before
   widget id, because it don’t really understand what ‘%1$s’ is supposed to do as
   an id
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years ago](https://wordpress.org/support/topic/css-on-sidebar/#post-4848066)
 * I’m sorry but as you appear to be using a commercial theme, you need to seek 
   support from the theme’s developer/vendor. We do not support [commercial products](http://codex.wordpress.org/Forum_Welcome#Commercial_Products)
   here.
    Try [http://themeforest.net/user/ThemeFusion](http://themeforest.net/user/ThemeFusion)
 * Generally speaking, `%1$s` is used in PHP to indicate a substitution – in this
   case the first variable passed by the handling function. Have a look at [http://codex.wordpress.org/Function_Reference/register_sidebar](http://codex.wordpress.org/Function_Reference/register_sidebar)
 *  Thread Starter [Krdm](https://wordpress.org/support/users/krdm/)
 * (@krdm)
 * [12 years ago](https://wordpress.org/support/topic/css-on-sidebar/#post-4848075)
 * Okay, thanks.

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

The topic ‘CSS on sidebar’ is closed to new replies.

 * 5 replies
 * 3 participants
 * Last reply from: [Krdm](https://wordpress.org/support/users/krdm/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/css-on-sidebar/#post-4848075)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
