WordPress.org

Ready to get started?Download WordPress

Forums

Three widgets in footer won't align to center for me.. (6 posts)

  1. davewgill
    Member
    Posted 3 years ago #

    Howdy...I've three widgets which won't align in the centre. If I didn't want a 100% wide footer it would work by setting to a specific size but with the width at 100% it just sits out on the left. Can anybody help me... I can fumble my way around css but I'm stumped on this.. I'm sure it's just something simple...

    demo site can be seen here http://mtbireland.com/hkr

    footer.php

    </div>
    </div>
    </div>
    <div id="footer">
    <div id="footer-left">
    <?php if ( !function_exists('dynamic_sidebar')
       || !dynamic_sidebar('footer 1') ) : ?> <li>
          <?php endif; ?>
      </div>
      <div id="footer-middle">
    <?php if ( !function_exists('dynamic_sidebar')
       || !dynamic_sidebar('footer 2') ) : ?> <li>
          <?php endif; ?>
      </div>
    <?php if ( !function_exists('dynamic_sidebar')
       || !dynamic_sidebar('footer 3') ) : ?> <li>
          <?php endif; ?>
      </div>
     </div>

    extract from stylesheet

    /* The Footer */
    
    #footer {
    	height:200px;
    	padding:20px 0 0 0;
    	color:#FFFFFF;
    	font-size:12px;
    	font-weight:normal;
    	text-align:left;
    	line-height:20px;
    	font-family: Tahoma,georgia,Century gothic,  Arial, sans-serif;
    	width:100%;
    	float:left;
    	background:#392E2C;
    	}
    
    /* Footer Widgets */
    
    #footer-left {
    	width: 210px;
    	float: left;
    	margin: 15px 10px 10px 30px;
    	padding: 10px;
    	text-align:left;
    }
    #footer-middle {
    	width: 210px;
    	float: left;
    	margin: 15px 10px 10px 15px;
    	padding: 10px;
    	text-align:left;
    }
    #footer-right {
    	width: 210px;
    	float: left;
    	margin: 15px 10px 10px 15px;
    	padding: 10px;
    	text-align:left;
    }
  2. Digital Raindrops
    Member
    Posted 3 years ago #

    Not sure what the problem is looks ok when I looked.

    The <div id="footer-right"> is missing from the code above, is that just a typo?

    Run the url through the validator, you have a couple of div errors correct these first as they can throw a theme out of kilter.

    David

  3. davewgill
    Member
    Posted 3 years ago #

    Thanks for that...I'll give the validator a go.... I put the footer-right div id back in...probably just deleted it when messing around with it..

  4. davewgill
    Member
    Posted 3 years ago #

    Anyone any more thoughts on this? It will probably look okay if you're using a resolution around 1024 wide as this is the width of the site but if you use anything wider then the widgets are way over to the left hand side....

    There must be a quick dirty fix to center the contents of the footer.php

  5. Gisha James
    Member
    Posted 3 years ago #

    Adjust margin-left property of footer-left, footer-right and footer-middle in style.css.

    It will be centered.

  6. davewgill
    Member
    Posted 3 years ago #

    Thanks for the reply Gisha... I've adjusted the left margin and it does move it out a bit from the right but it's still relative to the left side which means the position of the widgets is still very different depending on the width of the screen resolution.

    Must but an easy way to tell it to be centered and not justified to the left.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.