Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   [SOLVED] Correct Code to Align Cells in new 4 Column Widget Area Created in Footer (http://forum.bytesforall.com/showthread.php?t=14854)

New WordPress Fan Jul 10, 2011 05:22 PM

[SOLVED] Correct Code to Align Cells in new 4 Column Widget Area Created in Footer
 
Hi,

Using Atahualpa 3.6.4 and WordPress 3.1.4, I have used the following code in the ATO > Style and Edit Footer box to create a new four-column widget area in the Footer:

<?php bfa_widget_area('name=Footer 4Col Widget Area&cells=4&align=8&align_2=8&align_3=8& align_4=8&before_widget=<div id="%1$s" class="footer-widget %2$s">&after_widget=</div>'); ?>

It works, but I'd prefer to have the columns aligned so that the far right and far left columns are the same width as the right and left sidebars on the site (220), and the center two columns should each occupy half the width of the center column (which expands). I have the site set to expand, with a fluid width of 90%, a minimum total width of 940, and a maximum width of 1000.

Can someone give me the exact code to create the new footer widget area with that alignment and width? I'd be very grateful! (Sorry, but I don't really understand the instructions on the ATO > Create New Widget Area page. The example code they have there for creating a four column widget area did not seem to work at all.)

Many thanks!

juggledad Jul 10, 2011 06:35 PM

try
HTML Code:

<?php bfa_widget_area('name=Footer 4Col Widget Area&cells=4&align=8&align_2=8&align_3=8&align_4=8&width_1=200&width_4=200&before_widget=<div id="%1$s" class="footer-widget %2$s">&after_widget=</div>'); ?>

New WordPress Fan Jul 11, 2011 11:15 PM

Brilliant! That worked beautifully, with just a little tweeking on the widths. Thank you, Juggledad!!

Now the only remaining issue seems to be that the tops of the four widgets float up and down, depending on the amount of text I put in each widget. How can I make the tops of the 4 widgets fixed and aligned in a straight line across? Some CSS Code for each widget?

Again, thanks so much for your great help, Juggledad!!

juggledad Jul 12, 2011 03:54 AM

try using a 'vertical-align:top;'

New WordPress Fan Jul 12, 2011 12:36 PM

Tried that. Didn't seem to work. The selector I am using does affect the widget for other styling, but ...

Here is what I tried:

div#listcategorypostswidget-6 {
padding-right: 10px;
padding-left: 5px;
vertical-align: top !important;
}

The padding worked for the widget, but not the vertical align (with or without the !important).

Any other ideas? I am most grateful for your help!!!

juggledad Jul 12, 2011 01:06 PM

what is the url?

juggledad Jul 13, 2011 04:47 PM

your problem is that you have specified that they all align in the middle. When you defined the widget area you probably used the default alignment (1) which is 'middle' change it to 2, ie 'align=2' which will be top.

New WordPress Fan Jul 13, 2011 10:42 PM

Sorry to be dense, but I don't understand where to put the 'align=2'.

Here is the exact code I used to create the widget area:

<?php bfa_widget_area('name=Footer 4Col Widget Area&cells=4&align=8&align_2=8&align_3=8&align_4=8 &width_1=220&width_2=250&width_3=250&width_4=200&b efore_widget=<div id="%1$s" class="footer-widget %2$s">&after_widget=</div>'); ?></div>

How exactly would I change it to make the widgets in it top-aligned?

Thanks so much again for all your help!

lmilesw Jul 13, 2011 11:11 PM

Use this code instead.
HTML Code:

<?php bfa_widget_area('name=Footer 4Col Widget Area&cells=4&align=2&width_1=220&width_2=250&width_3=250&width_4=200&before_widget=<div id="%1$s" class="footer-widget %2$s">&after_widget=</div>'); ?></div>
I just replaced all the "&align_x" with the single align code which will align all cells as indicated in the New Widget area section.

New WordPress Fan Jul 14, 2011 11:31 AM

That worked perfectly!

Thank you both so much!!

I have made a donation to each of you via PayPal, with much appreciation. :)


All times are GMT -6. The time now is 12:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.