[thelist] <option value= > Specifying a Font Face

Sandra L sandra_etc at yahoo.com
Tue Mar 12 00:18:00 CST 2002


Thanks for the thorough response Jeff, however if you
view the following code in a browser, the problem is
not solved. (I am using IE 5.5).  The font color and
background color are both following the style tag in
the second option, but the font-family tag is still
being ignored.  I can still only change the
font-family for every option, not just one.  Is there
any way to change this?


******************************************************
<select name="selectText"
onChange="FormatText('FontName',
selectText.options[selectText.selectedIndex].value);document.frmSendmail.selectText.options[0].selected
= true;"
style="font-family: arial;
color: #000000;
border: outset;
font-size: 13px;
background: #ffffff">
						<option value="0" selected>-- Font Type
--</option>
<option value="Arial, Helvetica, sans-serif"
style=arial1>Arial</option>
<option style="background-color: #ff99ff; color:
#ff0000; font-family: times new roman" value="Times
New Roman, Times, serif">Times</option>
<option value="Courier New, Courier, mono">Courier
New</option>
<option value="Verdana, Arial, Helvetica,
sans-serif">Verdana</option>
</select>
******************************************************

Many Thanks,
Sandra.




--- ".jeff" <jeff at members.evolt.org> wrote:
> sandra,
>
>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > From: Sandra L
> >
> > Have come up blank in trying to set more than one
> font
> > face in the option values in a List. I have found
> how
> > to set a different font color and/or background
> color
> > for each item, but not the font face. For example
> I
> > would like the first option to be "Arial" in the
> Arial
> > font, second option "Times" in the Times font etc.
>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> <option
>  style="background-color: #ff99ff;
>         color: #000000;
>         font-family: arial"
>  value=""
> >text</option>
>
> <option
>  style="background-color: #ff99ff;
>         color: #000000;
>         font-family: times new roman"
>  value=""
> >text</option>
>
> be sure that whenever you define a color you preface
> it with a hash (#).
>
>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > <select name="menu" size=1
> > style="font-family: comic sans ms"
> > style="color: #FFFF00"
> > style="border: outset"
> > style="font-size: 9"
> > style="background: #CC99FF">
>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> you should only set a single "style" attribute.
> separate each of the values with a semi-colon (;).
>
> <select
>  name="menu"
>  size="1"
>  style="font-family: comic sans ms;
>         color: #FFFF00;
>         border: outset;
>         font-size: 9;
>         background: #CC99FF">
>
> also, you should be careful to make sure that each
> attribute value has quotes, preferably double-quotes
> ("), around it.  color values should be in
> lower-case.  measurements should have some sort of
> measurement designator (pt, px, em, %) assigned to
> them as well:
>
>  style="font-family: comic sans ms;
>         color: #ffff00;
>         border: outset;
>         font-size: 9px;
>         background: #cc99ff"
>
> you might even find it easier if you create a class
> in a <style> block in the head of your document and
> apply the class to your element:
>
> <style type="text/css">
> <!--
>   .menu {
>     font-family: comic sans ms;
>     color: #ffff00;
>     border: outset;
>     font-size: 9px;
>     background: #cc99ff;
>   }
> -->
> </style>
>
> <select
>  name="menu"
>  size="1"
>  class="menu">
>
> good luck,
>
> .jeff
>
> http://evolt.org/
> jeff at members.evolt.org
> http://members.evolt.org/jeff/
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/



More information about the thelist mailing list