If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / Change length of fieldset select

Change length of fieldset select

Started by barendfaber on 2 Apr 2012, 12:30 PM · Views: 763

Results 1 to 7 of 7
2 Apr 2012, 12:30 PM
#1
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Change length of fieldset select

Hi all,

I have added a Advanced Search Box to my site, please see at http://www.cks.digi-blue.co.uk/index.php?main_page=index&cPath=27.

Under Limit to Category, the drop down menu extends to far to the right due to categories, is there any way for me to amend this (set width) so the drop down menu fits within the width of the left column? :no:

2 Apr 2012, 12:57 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Change length of fieldset select

There is probably a width (field size / characters) setting in the module's tpl file.

20 years a Zencart User

2 Apr 2012, 1:19 PM
#3
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Change length of fieldset select

Thanks for the reply. I had a look at includes/my_template/sideboxes/tpl_advanced_search_sb.php. There is one section with:

$content = "";
$content .= '<script language="javascript" type="text/javascript"><!--' . "\n"; $content .= ' function popupSearchHelp(url) {' . "\n"; $content .= " window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,left=150') \n"; $content .= ' } //--></script>' . "\n";

But this seem to be for the pop up window. There does not seem to be any settings for categories:

$content .= '<fieldset><legend>' . SB_ENTRY_CATEGORIES . '</legend>' . "\n";
$content .= ' <div>' . zen_draw_pull_down_menu('categories_id', zen_get_categories(array(array('id' => '', 'text' => SB_TEXT_ALL_CATEGORIES)),'0' ,'', '1')) . '</div>' . "\n";
$content .= ' <br />' . zen_draw_checkbox_field('inc_subcat', '1', true, 'id="inc-subcat"') . '<label class="checkboxLabel smallLegend" for="inc-subcat">' . SB_ENTRY_INCLUDE_SUBCATEGORIES . '</label>' . "\n";
$content .= ' <br class="clearBoth" />' . "\n";
$content .= '</fieldset>' . "\n";

Any other ideas?

2 Apr 2012, 1:20 PM
#4
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Change length of fieldset select

Add this to your stylesheet_as_sidebox.css

#advancedsearchsbContent option {
width: 150px;
}

Note that some of the entries will wrap in more than one line.

2 Apr 2012, 1:24 PM
#5
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Change length of fieldset select

I've added this to the style sheet, however it still seems to be going across to the right hand side. Sorry for the hassle, but can you think of anything else I can do?

2 Apr 2012, 1:30 PM
#6
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Change length of fieldset select

The general HTML way is to use ...

select, option { width: __; }

... so try something like ...

#advancedsearchsbContent select, option {
width: 150px;
}

Rob

But wait! You just fixed it. How did you manage it finally?

Breakfast: the most important donut of the day.

2 Apr 2012, 1:32 PM
#7
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Change length of fieldset select

Thank you!!!! :clap: This worked! It now displays within the left column, when you click on it, it goes larger, which is perfect!

I actually applied the fix as soon as you sent it, when I refreshed the site it looked perfect.