Link to home
Start Free TrialLog in
Avatar of spoowiz
spoowizFlag for United States of America

asked on

Format text in <option>

In the code below, only "Current/History" text is correctly formatted as class "selectmenutext".
What is within the php code (<option>) text is not. How can I format the text in <option>?
As you can see, I tried both using class in <td> and <span>.
Thanks

<td  valign="center" width="120" bgcolor="#339999"  class=selectmenutext>
<span class=selectmenutext>
Current/History: <select onchange="window.location='index.php?coh='+this.value">
<?php
global $currORhist;
$list = array("Current","Historical");
for ($i = 0; $i <= 1; $i++) {
echo "<option value=\"$list[$i]\"";
if ($currORhist == $list[$i]) print " SELECTED";
echo ">" . $list[$i];
echo "</option>";
}
?>
</select>
</span>
ASKER CERTIFIED SOLUTION
Avatar of rdivilbiss
rdivilbiss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<style type="text/css">
.theClass {
     //whatever you want
}
</style?
Avatar of spoowiz

ASKER

thanks