spoowiz
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='+thi s.value">
<?php
global $currORhist;
$list = array("Current","Historica l");
for ($i = 0; $i <= 1; $i++) {
echo "<option value=\"$list[$i]\"";
if ($currORhist == $list[$i]) print " SELECTED";
echo ">" . $list[$i];
echo "</option>";
}
?>
</select>
</span>
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=
<?php
global $currORhist;
$list = array("Current","Historica
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
.theClass {
//whatever you want
}
</style?