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 » Sidebars & Widgets »

help: trying to center a button in a text widget


  #1  
Old Feb 13, 2009, 03:27 PM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
What is the best way to center, or otherwise align, pad, marginate (a word?) the contents of a text widget? I've inserted an "<a href=" link ref for the button into the text widget and the button is crammed all the way over against the left side of the widget.

Sort of in conjunction with the above: I am right in assuming that CSS changes done in the "Theme Options" CSS Inserts are stored in the WP database and should therefore survive either a WP or Atahualpa update?

Would setting up a "child theme" CSS file be an option? All my CSS changes/additions could be placed in the "child".css

I hope the above doesn't make it sound too much like I know what I'm doing.

Tnx Jim
  #2  
Old Feb 13, 2009, 05:34 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Try to wrap it into a container like this

HTML Code:
<div style="text-align:center">
... content ...
</div>
and put that into the text widget. As you can see I just used an inline style here because for a single style of a div that's used only once it might be too much trouble to add a CSS Insert just for that.

Of course if you want to add more styles or even use that container multiple times, adding the styles through CSS Inserts would be better. Do do that, you'd give the container a class of any name

HTML Code:
<div class="my-button-widget">
... content ...
</div>
and insert the style as CSS Insert
HTML Code:
div.my-button-widget {
text-align: center;
}
To center that box inside the widget as well (and not just the content inside that box), give it a defined width, and a left and right margin of "auto"

HTML Code:
div.my-button-widget {
text-align: center;
width: 100px;
margin-left: auto;
margin-right: auto;
}
Yes, CSS Inserts would be preserved as they are saved in the WP database.
  #3  
Old Feb 15, 2009, 06:45 PM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
Thank you, Flynn! Sorry I'm so late with the thanks. Life on the farm sort of got in the way.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Text Widget - how can I highlight all text (ctl-A) for a fast delete? Leoni Plugins & Atahualpa 5 Jul 14, 2009 07:38 PM
Subscribe widget not opening in new window and won't center fredless Sidebars & Widgets 3 Jun 11, 2009 05:16 AM
Changing a widget display from block to inline (Twitter Text Widget) Flur Sidebars & Widgets 2 May 7, 2009 11:45 AM
Editing Text within a Text Widget Nefeli Sidebars & Widgets 4 Mar 27, 2009 06:56 PM
Changing width of center text column vikram Atahualpa 3 Wordpress theme 5 Mar 7, 2009 04:49 AM


All times are GMT -6. The time now is 10:30 PM.


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