Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

New widget area width problem


  #1  
Old Dec 28, 2013, 09:23 AM
jms5017's Avatar
jms5017
 
112 posts · Jul 2010
NY/NJ Metro area
Using ATA 3.7.13
Created three new widgets in the header area using
<?php bfa_widget_area('name=varlogo&cells=3&align=7&alig n_2=7&align_3=7&width_1=200&width_2=100&width_3=10 0&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?>

web page is klarchitects.com/home2
The company name "Kapuscinski Luongo Architects" is varlogo_1 and the stylized "KLA" is varlogo_2
They should be only about 20 px between varlogo_1 and varlogo_2, but the width of each widget area
is taking a default instead of using the width parameters in the php code added to "style and edit header area"
What did I do wrong?
Thanks!
  #2  
Old Dec 28, 2013, 10:19 AM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Is that a space in the width for widget 3?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Dec 28, 2013, 11:05 AM
jms5017's Avatar
jms5017
 
112 posts · Jul 2010
NY/NJ Metro area
No space that I can see....It should be just the line break caused when I copy and paste. here it is pasted again. <?php bfa_widget_area('name=varlogo&cells=3&align=7&alig n_2=7&align_3=7&width_1=200&width_2=100&width_3=10 0&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?>
  #4  
Old Dec 28, 2013, 11:44 AM
jms5017's Avatar
jms5017
 
112 posts · Jul 2010
NY/NJ Metro area
The widths that I supply in the php code to create the widgets are showing up in firebug in the styling for the col width,
as in:
<colgroup>
<col style="width:200px">
<col style="width:100px">
<col style="width:100px">
</colgroup>

but there is nothing to constrain the width of the table id=varlogo, which is set to 100%

I suppose I can add css overrides to fix this, but if I did something wrong in setting up the widgets, I'd rather fix my error and do it right rather than applying band-aids on sloppy code....thanks!
  #5  
Old Dec 28, 2013, 12:57 PM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
This is interesting, you are right the table width is set to 100%. It looks like a table that is 100%, the column widths are actually a percent of the whole (if the page can get wider or smaller, the widget area size changes.

To make matters more interesting, the 'width' is not supported for 'colgroup' or 'col' in html5

for the moment you can edit 'function.php' and change line 392 from
HTML Code:
		echo '<table id="' . $area_id . '" class="bfa_widget_area" style="table-layout:fixed;width:100%" cellpadding="0" cellspacing="0" border="0">';
to
HTML Code:
		echo '<table id="' . $area_id . '" class="bfa_widget_area" style="table-layout:fixed;" cellpadding="0" cellspacing="0" border="0">';
but here is a question for you. If the page has a variable width, should the widget area always be a fixed size?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #6  
Old Dec 29, 2013, 10:47 AM
jms5017's Avatar
jms5017
 
112 posts · Jul 2010
NY/NJ Metro area
The page is fixed width 960 px.

Is there an advantage to edit the functions.php as you suggest instead of using CSS overrides
like:
table#varlogo.bfa_widget_area {
width: 400px !important;
margin: 10px 0 0 40px;
}

Thanks
  #7  
Old Dec 29, 2013, 12:00 PM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
personally I would use the CSS Insert, then it is a theme option and you won't have to remember to change it after future updates.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #8  
Old Dec 30, 2013, 10:32 AM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
You can also use the Code Snippets plugin instead of editing the functions.php which would keep the edits through a theme upgrade.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add half width new widget area? prooffairy Sidebars & Widgets 2 Jun 11, 2012 07:20 AM
How do I set a specific width for widgets in the same widget area sober Sidebars & Widgets 6 Jul 30, 2011 05:28 PM
[SOLVED] Change new widget area width jaxon Sidebars & Widgets 10 Feb 15, 2010 01:49 PM
[SOLVED] Change the cell width in new widget area duping812 New Versions, & Updating 2 Jul 16, 2009 07:19 PM


All times are GMT -6. The time now is 12:35 PM.


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