Title: Styling widget content specifically
Last modified: August 19, 2016

---

# Styling widget content specifically

 *  [jwburnside](https://wordpress.org/support/users/jwburnside/)
 * (@jwburnside)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/styling-widget-content-specifically/)
 * Hey everyone, I am trying to specifically style the content of a widget (whatever
   is underneath the title). All I really would like to do is add a border to it
   that doesn’t apply to the widget title as well. Unless I am missing something
   I don’t think this can be done from the functions file. Any help would be appreciated,
   thanks.
 * Justin

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

 *  [Edward Caissie](https://wordpress.org/support/users/cais/)
 * (@cais)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/styling-widget-content-specifically/#post-1350904)
 * Style is a CSS function. The functions.php file is creating the markup for the
   widget but your border would generally be best handled via the CSS.
 * Styling a specific widget with its own specific properties may also be widget
   specific as well, not all plugins provide sufficient CSS elements to style them
   uniquely.
 * Knowing which specific widget you want to style may also be helpful … a link 
   to your blog and/or theme may also be useful.
 *  Thread Starter [jwburnside](https://wordpress.org/support/users/jwburnside/)
 * (@jwburnside)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/styling-widget-content-specifically/#post-1350968)
 * Sure, you can view an image of what I am trying to accomplish at:
    [http://www.jwbriggs.net/z/sidebarexample.jpg](http://www.jwbriggs.net/z/sidebarexample.jpg)
   Just trying to put a border around and slightly narrow the widget content.
 * But from what I have researched and what you are suggesting it looks like the
   content of the widget is specific to the widget itself, which means it would 
   not allow the user to arbitrarily add widgets that weren’t specifically formatted
   with CSS.
 * Any way around this? Thanks,
 * J
 *  [Edward Caissie](https://wordpress.org/support/users/cais/)
 * (@cais)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/styling-widget-content-specifically/#post-1350969)
 * The image you provided a link to shows a fairly homogeneous style for the widgets.
   The border around the widget content in each “block” is the same and would typically
   be done using the same CSS element.
 * Now, for example, if you wanted the middle “box” to have a thicker border, or
   dotted, or none at all you would need to be able to specifically identify that
   widget.
 * This may be possible from the theme’s design, or if the widget is using its own“
   wrapping” CSS element, but if neither of these criteria are being met then you
   may find it to be a significant challenge to use standard CSS to manipulate the
   style of the particular widget.
 * You might consider some sort of java script to accomplish this but that would
   leave the aesthetics of the site to the choice of your readers having java scripting
   enabled in their browsers.
 *  Thread Starter [jwburnside](https://wordpress.org/support/users/jwburnside/)
 * (@jwburnside)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/styling-widget-content-specifically/#post-1350971)
 * OK, I got it. I was just looking for a common class associated with all of the
   instances of widget content. There isn’t one, but most of them can be customized
   by the unordered list tag (in my theme at least). I’ll still have to apply css
   to the stragglers like text widgets, but this takes care of most of my issues.
   Thanks for the help.
 * J
 *  [Edward Caissie](https://wordpress.org/support/users/cais/)
 * (@cais)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/styling-widget-content-specifically/#post-1350999)
 * You may be able to edit your theme’s function.php file to add a “common class…
   to all the instances of the widget content”.
 * Have a look at this page as a point of reference: [http://codex.wordpress.org/Function_Reference/register_sidebars](http://codex.wordpress.org/Function_Reference/register_sidebars)

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

The topic ‘Styling widget content specifically’ is closed to new replies.

 * 5 replies
 * 2 participants
 * Last reply from: [Edward Caissie](https://wordpress.org/support/users/cais/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/styling-widget-content-specifically/#post-1350999)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
