Sidebar widget alignment
-
Hi Guys, just wondering if any one can help.
Ive created a side bar to go on my site, its all working hunky dorey untill i add more than 1 widget.
For example:
the side bar is on the left, ive aligned it so that the widgets come away from the left hand side by 4px giving you a nice gap.
Each widget is in its own stylised box. The first widget follows this rule, but then the 2nd widget almost abandons the fact there are any rules and goes inside the first widgethere is my code:
functions.phpregister_sidebars( 1, array( 'name' => 'sidebar UBMS', 'id' => 'ubmssidebar', 'before_widget' => '<div id="%1$s" class="ubmsBlock">' ) );
style.css
.ubmsBlock { width: 725px; height: auto; margin-bottom: 10px; padding: 10px; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; -moz-border-radius-bottomleft: 10px; -moz-border-radius-bottomright: 10px; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; box-shadow: inset 0 0 10px 5px rgba(0,0,0,0.10); background-color: white; border-top: solid rgba(0,0,0,0.5); border-right: solid rgba(0,0,0,0.5); border-left: solid rgba(0,0,0,0.5); border-bottom: solid rgba(0,0,0,0.5); border-width: 0.1em; }
The page im doing this for us https://www.ubmsonline.org
The ‘Shalom’ box and the image underneith it are the widgets. (yes the side bar stretches across the page to create a larger left side bar and small right side bar with no content, this is what is needed for the client)I have had a look using firebug and it would appear the widgets are pointing at the same side bar but doing completely different things.
==edit==
I forgot to mention im using my own template aswell to call both left and right side bars<?php /*template name: UBMS front */?> <?php get_header()?> <?php do_action( 'bp_before_sidebar' ) ?> <div class="v_line v_line_right"></div> <div id="sidebar" class="widgetarea"> <div class="right-sidebar-padder"> <?php do_action( 'bp_before_after_sidebar' ) ?> <?php if( ! dynamic_sidebar( 'sidebar' )): ?> <?php endif; // end primary widget area ?> <?php do_action( 'bp_inside_after_sidebar' ) ?> </div><!-- .padder --> </div><!-- #sidebar --> <div id="ubmssidebar" class="widgetarea"> <div class="left-sidebar-padder"> <?php if(defined('BP_VERSION')){ ?> <?php if( ! dynamic_sidebar( 'ubmssidebar' )) : ?> <?php widget_community_nav() ?> <?php endif; // end primary widget area ?> <?php } else {?> <?php if( ! dynamic_sidebar( 'ubmssidebar' )) : ?> <?php endif ?> <?php } ?> </div><!-- #paddersidebar --> </div><!-- #leftsidebar --> <?php do_action( 'bp_after_sidebar' ) ?> <?php get_footer() ?>
Help any one? ??
- The topic ‘Sidebar widget alignment’ is closed to new replies.