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] Center all widgets in Right Sidebar (http://forum.bytesforall.com/showthread.php?t=17658)

adrian29630 May 24, 2012 05:38 PM

[SOLVED] Center all widgets in Right Sidebar
 
Hi I am working on a new site design where it would look better if all widgets appearing in the right sidebar were centered. There will be a mix of types, image, text translate, etc. Some widgets provide a placing option but some don't.

Is there a way to control the position of all widgets via a CSS insert?

Using WP 3.3.2 And Atahualpa 3.6.7 by the way.

Thanks

lmilesw May 24, 2012 09:41 PM

You can't necessarily position all widgets via one CSS rule. It depends on the selectors used by the plugin developer.

adrian29630 May 25, 2012 01:11 PM

Thanks for the reply. The particular widget I want to center is the Translate This widget. I have added the following to the CSS inserts:-
<style type="text/css">
#translate-this {
text-align: center;
}

#translate-this .translate-this-button {
float: none !important;
margin: 0 auto;
}
</style>

This has centered the button and I would have thought should also have done the same with the text heading (Title) but that is still remaining to the left!

Any suggestions to rectify this greatly appreciated

Thanks

lmilesw May 25, 2012 02:21 PM

I don't know if this is the issue but you don't need
HTML Code:

<style type="text/css">
</style>

Just the CSS

adrian29630 May 25, 2012 02:42 PM

Thank you for the reply. I have removed the above which leaves the button centered but still the Title text left aligned and not centered. Very odd as I would have thought the "text-align:center; should have taken effect. However in the source code it says:-

<div id="ttb-widget-4" class="widget translate_tb_widget">
<div class="widget-title">
<h3>
Translate this Page
</h3>
</div>

So I am wondering if it is taking the overriding instruction for the position for all h3 titles which could be left aligned in the right hand sidebar?

juggledad May 25, 2012 02:45 PM

what is the url?

lmilesw May 25, 2012 02:45 PM

You might have to add !important to the CSS but without seeing the site I am guessing.

adrian29630 May 25, 2012 02:50 PM

!important; didn't work unfortunately. website url is http://repdomproperties.com/visitjd/

Thanks

lmilesw May 25, 2012 02:57 PM

The translate-this ID is not the correct one to target. This is what I see as the proper CSS with Firebug
HTML Code:

#ttb-widget-4 .widget-title {
    text-align: center;
}


adrian29630 May 25, 2012 03:13 PM

Magic!!! That certainly did the trick. Thank you so much

Kind regards

Adrian


All times are GMT -6. The time now is 07:19 AM.

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