Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   [SOLVED] Creating centered adsense below the header image (http://forum.bytesforall.com/showthread.php?t=15384)

sean.e Sep 13, 2011 11:55 PM

[SOLVED] Creating centered adsense below the header image
 
Hi!

I've scoured all the threads on header + adsense, and am still having trouble. It seems a very simple problem: I am trying to get the ad under my menu to be aligned center, instead of aligned right.

I am using the top widget area to accomplish this, but I can't figure out how to tweak the alignment. Here is the code I'm using (taken from another threat on the same subject:

<div id="my-head"> <?php bfa_widget_area('name=topwidgetarea&cells=2&width_ 1=730&width_2=230&align=8&align_2=6&before_widget= <div id="%1" class="header-widget %1">&after_widget=</div>'); ?> </div>

Here is my site: http://www.newmusicrelease.net

Thanks for any help.

Sean

lmilesw Sep 14, 2011 10:48 AM

Take a look at the New Widget Area section of the theme options. A single celled widget area that is build to align the contents in the center would do the trick. Not sure what all the other code you have is for along with having a two celled widget area you have it wrapped in a div which in this case I don't think is necessary.

sean.e Sep 14, 2011 02:35 PM

Wow. I never saw the new widget area before, so thanks for that!

I'm still having trouble. It doesn't make a whole lot of sense to me. I can't tell which things will give me a widget that displays a 728 (or whatever) by 60 ad in the very center under my menu.

Can anyone help me with this? Can anyone produce the little bit of code for me to insert?

Much, much obliged.

:)

-sean

lmilesw Sep 14, 2011 03:33 PM

Try this
First remove the widget from the widget area you put in. Then remove the code for the widget area.
Now go to the Add New Widget Area section and delete the widget area you just removed the code for.
Add the following code in the same place you just removed the old code from. The default should align what you put in it top center. If it doesn't it's an easy fix.
HTML Code:

<?php bfa_widget_area('name=Top Widget Area'); ?>
After you have that there you should take out the widgets you have in the current widget area and delete the old widget area in

sean.e Sep 14, 2011 04:52 PM

Hmm.

I did as suggested, but it did not give me a widget area on the widget selection screen (where it has left, left inner, right, and right inner widget areas. :(

Wonder why.

juggledad Sep 14, 2011 05:39 PM

did you go view the site before looking at the widget area? The code has to be run (by visiting the site) before the widget area will show up

sean.e Sep 14, 2011 11:42 PM

Yes, thanks. I did that, and the widget is there, but still displaying to the left. Here is the code I currently have in place:
<?php bfa_widget_area('name=Top Widget Area'); ?>

and my site still looks like this: newmusicrelease.net

lmilesw Sep 15, 2011 05:51 AM

You just need to use some CSS to center. Here is one snippet that should work.
HTML Code:

#text-29 {
    text-align: center;
}


sean.e Sep 15, 2011 02:22 PM

So I just stick that in the css page in "editor" at any place? Does it matter?

I've never done something like that before, so I'm not sure where the code should actually be placed!


Thx.

juggledad Sep 15, 2011 02:55 PM

put the css in the ATO->Add HTML/CSS Inserts->CSS Inserts option

sean.e Sep 16, 2011 08:28 AM

amazing! It worked!

Thanks guys :)


All times are GMT -6. The time now is 11:15 PM.

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