• Resolved Andeh86

    (@andeh86)


    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 widget

    here is my code:
    functions.php

    register_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? ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • @andeh86 am not hijacking your post but hope the one who might help you might help me as well. As i see we could have similar problem.

    My problem is I added another sidebar and i want it to be aligned to the right hand side but instead the sidebar is aligned at the botton righ hand side of a page . Here is the site

    I have tried to play with CSS with no Sucess.

    Thread Starter Andeh86

    (@andeh86)

    @mtazamaji I’m afraid your going to have to raise your own ticket. i have fixed my issue ?? sorry!

    For any one else having this issue, its because you will also be being as stupid as me!

    Forgot to put an ‘after widget’ in the functions.php
    new code:

    register_sidebars( 1,
    		array(
    			'name' => 'sidebar UBMS',
    			'id' => 'ubmssidebar',
    			'before_widget' => '<div id="%1$s" class="ubmsBlock">',
    			'after_widget' => '</div><div class="clear"></div>'
    		)
    	);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sidebar widget alignment’ is closed to new replies.