markob83
Member
Posted 7 months ago #
Hi all,
I'm in the middle of creating my first theme and have been stuck on this for a few hours. Is there a way to style each active widget that is in a sidebar? I'm confused on how to call each widget and assign them different classes. Let me know if you need more info.
Thanks,
Mark
how to call each widget and assign them different classes
how did you use 'register_sidebar()' in functions.php of your theme?
the parameters in 'before_widget' - 'before_widget' => '<li id="%1$s" class="widget %2$s">' would add individual css classes and ids to each widget.
http://codex.wordpress.org/Function_Reference/register_sidebar
there is a related topic for even more css classes:
http://wordpress.org/support/topic/how-to-first-and-last-css-classes-for-sidebar-widgets?replies=9
markob83
Member
Posted 7 months ago #
Thank you alchymyth. The links helped me.