Forum Moderators: coopster

Message Too Old, No Replies

How do you change the colour of a menu drop down?

         

marcus76

12:15 pm on Aug 20, 2006 (gmt 0)

10+ Year Member



Hi All,

Could somone please help me with changing the colour of a default menu dropdown? The border / dropdown arrow..Code snippet below.

Many thanks

Marc

<?php
// Additional Products Sort
echo '<td align="right" class="smallText">' . tep_draw_form('sort', FILENAME_DEFAULT, 'get') . 'Sort by: ';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {
echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
} else {
echo tep_draw_hidden_field('cPath', $cPath);
}

$sort_list = array('5d' => 'Best Sellers',
'3a' => 'Price Low to High',
'3d' => 'Price High to Low');
foreach($sort_list as $id=>$text) {
$sort_range[] = array('id' => $id, 'text' => $text);
}

echo tep_draw_pull_down_menu('sort', $sort_range, (isset($HTTP_GET_VARS['sort'])? $HTTP_GET_VARS['sort'] : ''), 'onchange="this.form.submit()"');
echo tep_draw_hidden_field('filter_id', (isset($HTTP_GET_VARS['filter_id'])? $HTTP_GET_VARS['filter_id'] : ''));
echo '</form></td>' . "\n";
// End Additional Products Sort

?>

dreamcatcher

2:00 pm on Aug 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi marcus76,

That looks like osCommerce code. The colours that control the drop down are usually in the stylesheet.

dc

whoisgregg

11:04 pm on Aug 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Like dreamcatcher points out, this is a CSS thing. If you aren't sure where to look in the CSS, take a look at the generated HTML for the dropdown and look for a class or id you can use to define a style.

It's faster to look at the generated HTML in an osCommerce install than it is to burrow through the 10 different files with identical filenames in all different directories to find the right piece of PHP code.

tep_ functions... ::shivers::

marcus76

11:25 am on Aug 21, 2006 (gmt 0)

10+ Year Member



thanks guys, i'll give that a shot tonight.

cheers

Marcus

marcus76

7:51 pm on Aug 23, 2006 (gmt 0)

10+ Year Member



ok, so i have this html on the page:

<td align="right" class="dropdown"><form name="sort" action="index.php" method="get">Sort by: <input type="hidden" name="cPath" value="43"><select name="sort" onchange="this.form.submit()"><option value="5d">Best Sellers</option><option value="3a">Price Ascending</option><option value="3d">Price Descending</option></select><input type="hidden" name="filter_id"></form></td>

what's the actual CSS to change the colour if i have this?

.dropdown {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
font-weight: bold;
color: #ff6699;
}

any ideas?

thanks

Marcus

coopster

8:44 pm on Aug 23, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



This JavaScript discussion on a multicolor Listbox [webmasterworld.com] should give you a start.