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] Align left on footer widget (http://forum.bytesforall.com/showthread.php?t=8724)

lucy Aug 5, 2010 05:39 PM

[SOLVED] Align left on footer widget
 
I created a footer widget area- by adding this in the STYLE AND EDIT FOOTER section

<?php bfa_widget_area('name=Footer widget area&cells=3&before_widget=<div id="%1$s" class="footer-widget %2$s">&after_widget=</div>'); ?>

Which worked great, but it's all center aligned and I would like them aligned left.

Then I added this in the "Add HTML/CSS Inserts" . CSS INSERTS

#footer-widget {
float: left;

I am sure I am doing something really dumb here. On another site using the twentyten theme I easily formatted it as follows:
#footer-widget-area .widget-area {

float: left;

margin-right: 20px;

width: 220px;

list-style:none;

lmilesw Aug 5, 2010 09:29 PM

So what you built is a 3 cell widget area and you don't have a cell align specified so it goes to the default of center top as shown in ATO>Add new widget areas instructions. I you want them aligned to the left in the middle of the cell you would add &align=8 so your code would look like the following.

HTML Code:

<?php bfa_widget_area('name=Footer widget  area&cells=3&align=8&before_widget=<div  id="%1$s"  class="footer-widget  %2$s">&after_widget=</div>'); ?>
I'm not sure what you are trying to do with the float but it would be a class (.footer-widget) and not an ID (#footer-widget). What do you want to float the widget area to the left of?

Also did you code a widget area for the Twentyten theme?

lucy Aug 5, 2010 09:48 PM

Thank you! This worked.

Help me understand the 8 thing though. If you want to have just 3 widgets along the bottom, you are still creating 8 buckets, but you are spreading out 3 widgets along the 8 buckets?

Oddly enough it's created footer widget area 1-8 and then it created footer widget area 1-3 again, so there are duplicates. They are just empty though in the back end and don't show up on the front end. It didn't break anything but it's kind of messy looking in the back end.

lmilesw Aug 5, 2010 09:57 PM

Can you please post everything that is in your footer area box? The code I gave should have produces 3 side by side widget areas whose content is aligned to the left and centered vertically. The &align=8 is for a left centered alignment.

Also check ATO>Add new widget areas and see how many are listed at the top of that page.

lucy Aug 5, 2010 10:05 PM

Thanks for your concern.

In the STYLE & EDIT FOOTER > Footer: Content we have
<?php bfa_widget_area('name=Footer widget area&cells=3&align=8&before_widget=<div id="%1$s" class="footer-widget %2$s">&after_widget=</div>'); ?>

The add new widget area part looks like this-
Delete custom Widget Areas
1) Delete the <?php bfa_widget_area(...) ?> code from whichever text area here in the theme options you placed it in.
2) Select the widget areas that you want to delete and click the link below.
Note: The widget areas will be re-created until you deleted its associated code (see step 1).
Footer widget area 1
Footer widget area 2
Footer widget area 3
Footer widget area 4
Footer widget area 5
Footer widget area 6
Footer widget area 7
Footer widget area 8
Footer widget area 1
Footer widget area 2
Footer widget area 3

lmilesw Aug 5, 2010 10:12 PM

I'm not sure what happened Lucy but here is what I would do.
  1. Take out the code for the new widget area. If you highlight it and hit Ctrl+x you will eliminate it but still have it in the clipboard for pasting back later.
  2. Go to ATO>Add New Widget Areas, select all the areas and delete them. You should see a confirmation in that area when they have been deleted.
  3. Go back to the footer and paste in the code you just took out
  4. Go the the home page and refresh it a couple of times.
You should now have 3 new widget areas whose internal alignment is left and centered vertically.

lucy Aug 6, 2010 06:36 AM

Thank you Larry. That got rid of the duplicate ones. Of course I could not restrain myself and changed it to 4. It works great. I will share the results on the showing off thread when I move it to the production server!


All times are GMT -6. The time now is 08:31 AM.

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