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] Image placement in sidebar text widgets (http://forum.bytesforall.com/showthread.php?t=16514)

dmstauber Jan 17, 2012 01:02 AM

[SOLVED] Image placement in sidebar text widgets
 
I have two problems, probably related and probably elementary. ATA latest, Wordpress 3.3.1. My site is cheeringelf.com. I'm a beginner; I've been reading w3schools and threads here but am confused.

In my left sidebar, I have put an image in a text widget. The image is the same width as the sidebar, but it's coming out off-center (so that it extends into the center area).

In my right sidebar, I have a thumbnail image link in a text widget. The title of the widget (prefer to pay by check, etc.) is centered, but I can't get the image to center.

I'm sure this is an issue about either margins or padding (which?) but I'm not sure how to write the CSS and where to put it.

Thank you thank you!!

Do Mi

lmilesw Jan 17, 2012 06:03 AM

For the left side bar you just need to increase the width of the sidebar in the theme options to something like 184px or you could use CSS and put overflow:hidden on td#left.

For the right sidebar you could use text-align for the widget. for example
HTML Code:

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

This would go in the CSS Inserts box in the theme options.

As you will continually find there are usually several ways to accomplish what you want. I suggest getting familiar with the Firebug extension for Firefox.

dmstauber Jan 17, 2012 10:27 PM

Thanks, Larry! I'm going to love Firebug!

I made the left sidebar bigger. Now the image is centered in it. But I want the image to fill it (that's why I made the image the same pixel width as the sidebar was). ??

And the CSS insert worked on the other side!

I have added another text widget on the left with just text in it (contact us); the text is spilling out of the sidebar. How do I change the size of the widget?

Going to donate now...

Do Mi

dmstauber Jan 17, 2012 10:33 PM

Hmm, answering my own last question: I think I need to either make the font size smaller or switch to the larger sidebar. The element that's spilling over is too long and the widget isn't breaking it.

Do Mi

lmilesw Jan 18, 2012 06:23 AM

To make the background image fill the width of the sidebar you would put a background on td#left like...
HTML Code:

td#left {
    background: url("http://cheeringelf.com/wp-content/themes/atahualpa364/images/elf-sidebar.jpg") no-repeat #FDFA93;

You will also need to reduce the size of your sidebar to where it was.
Even though this code can go in CSS Inserts I would put it in the LEFT Sidebar Style box in the Style & configure sidebars section of the theme options.

dmstauber Jan 18, 2012 10:29 AM

Okay, I tried the td#left background. It moved the image over again, and incidentally messed up my page menu and center layout! So I took it out. However, I then realized that I needed to change the sidebar padding to 0px, and that fixed it!

About td#left: do I understand that it is pointing to the sidebar as the left cell of a table?

Thank you!!!

juggledad Jan 18, 2012 10:38 AM

Quote:

About td#left: do I understand that it is pointing to the sidebar as the left cell of a table?
That is correct

dmstauber Jan 18, 2012 10:43 AM

Okay, another piece in place.

I wonder why putting the tdleft code in the sidebar styling area changed my page menu? But I'm content to have fixed it!

Just donated to both you and Larry. I'm so grateful.

Do Mi


All times are GMT -6. The time now is 01:38 AM.

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