Support » Fixing WordPress » It’s hard to modify widgets look

  • Right now I’m coding and designing my own WordPress theme, but I can’t figure out how to edit the widgets to look right. When no widgets are on, my default sidebar looks like this:

    <div id="widget">
    						<li>Link 1</li>
    						<li>Link 2</li>

    …I know when widgets are on, WordPress will declear the different styles, attributes, classes – whatever.. so I was thinking if anyone could help me get my widgets to look like my default sidebar widget?

    Here’s a screenshot of how it looks in action (default sidebar).


    Edit: The latst posts are all just dummies… Here’s how my CSS looks:

    #widget {
    background:#FFFFFF none repeat scroll 0 0;
    border:1px dashed #BBBBBB;
    margin:0 0 32px;
    padding:15px 15px 0;
    #widget ul li {
    border-bottom:1px dashed #BBBBBB;
    padding:4px 0 7px;
    #widget ul .children li {
    border:medium none;
    padding:0 0 0 8px;
    #widget ul {
    margin:0 0 25px;

    Need more code? Please tell. 🙂

Viewing 1 replies (of 1 total)
  • Do you have this, or something similar in your functions.php file?

    if ( function_exists('register_sidebar') )
          'before_widget' => '<div class="widget">',
          'after_widget' => '</div><!--/widget-->',
          'before_title' => '<h2 class="hl">',
          'after_title' => '</h2>',

    … and something like this “wrapping” the widget area:

    <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
    <?php endif; ?>

    Also consider, CSS should be “.” for class as widgets are multiple occurences on the same page versus “#” for IDs, or single occurences.

Viewing 1 replies (of 1 total)
  • The topic ‘It’s hard to modify widgets look’ is closed to new replies.