Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

[SOLVED] Center Header Widget?


  #1  
Old Nov 30, 2009, 11:18 AM
ChrisPanimation's Avatar
ChrisPanimation
 
68 posts · Nov 2009
Mississauga, ON
[SOLVED] Center Header Widget?

Hey guys,

This is how I set up my header area for now, but I'm a little stumped on how to center this widget.

%bar1 %image <?php bfa_widget_area('name= Header Widget'); ?> %pages %bar2

It's an add in the header. It's currently sitting on the left - could you let me know where in the theme options/which theme option... I can make the change so it is centered on my page.

Thanks,
Chris
  #2  
Old Nov 30, 2009, 12:52 PM
Julia
 
14 posts · Oct 2009
Hi,

I have the same problem.

I put this code
%logo <?php bfa_widget_area('name=My new widget area'); ?> %image

but the widget is at the left while I want it center.

Can somebody give me the exact code to put it to have the new widget centered in the logo area?

Thank you
  #3  
Old Nov 30, 2009, 01:56 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
When you only define one widget area (that's what you get when you use the minimal options) the widget area is the entire with of the section it is placed in. Since you have defined a widget in the header area, the widget area spans the entire width of the page.

But you want it centered and not spread across the page!! How do you do this? The answer...CSS!

You can use CSS on the new widget areas just like everywhere else, so lets say you added the following to the header area
HTML Code:
<?php bfa_widget_area('name=Header_Widget'); ?>
(NOTE: I named the widget with an underscore to make it easier to address it later)
And you want the widget to be in the center and only take up 30% of the page width, here is what you would code as your CSS Insert:
HTML Code:
div#header_widget {
width: 30%;
margin-right: auto;
margin-left: auto;
}
this will keep the widget centered and only take up 30% of the page space no matter how wide it is. You may want to make this a fixed width depending on what you are using the widge for. Have fun.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Nov 30, 2009, 02:21 PM
ChrisPanimation's Avatar
ChrisPanimation
 
68 posts · Nov 2009
Mississauga, ON
Hey Juggledad, I'm not really sure where to put this. In themes > style.css, or css.php ?
  #5  
Old Nov 30, 2009, 02:38 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
the CSS goes in ATO->Add HTML/CSS Inserts->CSS Inserts
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #6  
Old Nov 30, 2009, 02:49 PM
ChrisPanimation's Avatar
ChrisPanimation
 
68 posts · Nov 2009
Mississauga, ON
Thanks, I put it there and re-activated the theme a couple of times. Maybe it will take a little time to show up?

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get my logo in the center of the header area? vasantib Header configuration & styling 22 Mar 12, 2010 08:49 AM
[SOLVED] Center Text in Text Widget container kippiper Sidebars & Widgets 2 Nov 13, 2009 03:51 AM
[SOLVED] Can no longer set height of header image after adding header widget tfs Header configuration & styling 7 Oct 15, 2009 01:50 PM
Subscribe widget not opening in new window and won't center fredless Sidebars & Widgets 3 Jun 11, 2009 05:16 AM
help: trying to center a button in a text widget Shepherd Jim Sidebars & Widgets 2 Feb 15, 2009 06:45 PM


All times are GMT -6. The time now is 08:13 PM.


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