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)
-   -   Widget Background Disappeared (http://forum.bytesforall.com/showthread.php?t=18912)

sleenie Nov 15, 2012 11:57 AM

Widget Background Disappeared
 
Trying to put a background on some widgets I added. Had the background working and then all of a sudden the background was gone. The only thing I did was change the alignment to top and even after that it was working. I did have to reboot my computer due to some upgrades but that is it.

Is not the background for the widgets under Style Widgets>Widget Containers? This is the code that is there.

Code:

font-family: tahoma, arial, sans-serif;
vertical-align: top;
font-size: .9em;
line-height: 1.4;
padding: 5px 5px 5px 5px;
margin-bottom: 5px;
margin-left: 5px;
background: url("/hoffbrau/wp-content/themes/atahualpa.3.7.9/atahualpa/images/paper.jpg") repeat scroll center top;


sleenie Nov 15, 2012 02:18 PM

I managed to get the background on the widgets in but did it thru CSS Inserts on each individual widget. Not really the way I wanted to do it but couldn't get it working in the Widget Container.

Would still like some advice on the other if possible.

juggledad Nov 15, 2012 02:55 PM

I'd have to see the site to take a guess

sleenie Nov 16, 2012 11:15 AM

Ok, continuing to have problems with my widgets. since I decided to adjust the individual widgets, I can't seem to get them to look the same on IE. Mainly the Social Media widget. It may be the plugin, still working on checking that out.

Here is the site. I'm taking it off maintenance for a while.

juggledad Nov 16, 2012 01:55 PM

are you talking about the line up of the background image and that in the social media widget it seems to be shifted to the right a little?

sleenie Nov 16, 2012 02:15 PM

Thanks for looking. I've been playing and fixed most everything except 2 things. I'm pretty sure I can fix that one.

At this point my biggest problem is keeping the bottom edges of all 3 widgets lined up, which is not really an ATA probem. Once I get it lined up for one browser then it doesn't work on another. Kind of backed off for a while so that I can look at it again with a fresh mind.

juggledad Nov 16, 2012 02:31 PM

Let me see if I can explain something.

When you use the theme options (ato->Style WIDGETS->Widget Container) to do some styling, it creates a CSS selector 'div.widget' and puts your rules under that. Then the widgets are created with code like
HTML Code:

<div id="text-6" class="widget widget_text">
and the CSS is applied.

Now when you create a new widget area and add the new widget option
HTML Code:

&before_widget=<div id="%1$s" class="Header-widget %2$s">&after_widget=</div>
you are saying "I want to change the classes that are assigned to my new widget area and give it a class of 'header-widget'". Now the widget code will look like this
HTML Code:

<div id="calendar-9" class="Header-widget widget_calendar">
and since this does not match the selector 'div.widget' the rules from the widget area styling does not get applied.:(

Now if you changed the new widget code from
HTML Code:

<?php bfa_widget_area('name=Header widget&cells=3&align=2&width_1=675&width_3=240&before_widget=<div id="%1$s" class="Header-widget %2$s">&after_widget=</div>');?>
to
HTML Code:

<?php bfa_widget_area('name=Header widget&cells=3&align=2&width_1=675&width_3=240&before_widget=<div id="%1$s" class="widget %2$s">&after_widget=</div>');?>
or
HTML Code:

<?php bfa_widget_area('name=Header widget&cells=3&align=2&width_1=675&width_3=240&before_widget=<div id="%1$s" class="Header-widget widget %2$s">&after_widget=</div>');?>
or even
HTML Code:

<?php bfa_widget_area('name=Header widget&cells=3&align=2&width_1=675&width_3=240');?>
the code would be
HTML Code:

<div id="calendar-9" class="widget widget_calendar">
and this code matchs the selector 'div.widget', so the rules from the widget area styling get applied.:)

I hope this helps.

sleenie Nov 16, 2012 05:37 PM

It is beginning to make more sense. I do appreciate you taking the time to go over this. I need to spend some time reviewing and studying it some more.

Again, thanks.


All times are GMT -6. The time now is 11:37 AM.

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