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] How to center images placed in text widget? (http://forum.bytesforall.com/showthread.php?t=13183)

frugalmom Mar 6, 2011 04:59 PM

[SOLVED] How to center images placed in text widget?
 
I've created a text widget to hold my twitter and facebook images, which are linked to those accounts. I would like to center the images next to each other in the text widget. (You can see them at http://frugalfunottawa.ca/frugalfish/ in the left-hand sidebar. I have used <div id="icon"> before the a href and img tags in the text box, and added div.icon {padding: 10px;} to the css Add HMTL/CSS inserts tab in the atahualpa options, but the images are still to the left. (I also tried #icon {padding:10px;} but that didn't work either. Any help would be appreciated!

lmilesw Mar 6, 2011 06:00 PM

To center a div you give it a width and auto left and right margins. In your case it would be something like.
HTML Code:

#icons {
width: 130px;
margin-right: auto;
margin-left: auto;
}

Sometime you have to tweak the width a bit.

frugalmom Mar 6, 2011 07:44 PM

Thank you! It worked beautifully!


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

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