File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Trouble with displaying fonts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Trouble with displaying fonts" Watch "Trouble with displaying fonts" New topic
Author

Trouble with displaying fonts

Divya Guttikonda
Ranch Hand

Joined: Mar 09, 2005
Posts: 47
Hi

I have the following code which i am trying to get work.All i need is to display the font in the same font style in the dropdown list.I mean i want to see the option in the dropdown in the same font.Arial should be seen as Arial.But this is not working.Can somebody help?

<select size="1" name="SelectFont" onChange="dosomething()">
<option style="font-family: AndaleMono;" value="Andale Mono">Andale Mono</option>
<option style="font-family: Arial;" value="Arial">Arial</option>
<option style="font-family: Arial Black;" value="Arial Black">Arial Black</option>
<option style="font-family: Arial Narrow;" value="Arial Narrow">Arial Narrow</option>
<option style="font-family: Comic Sans MS;" value="Comic Sans MS">Comic Sans MS</option>
<option style="font-family: Courier New;" value="Courier New">Courier New</option>
<option style="font-family: Helvetica;" value="Helvetica">Helvetica</option>
<option style="font-family: Impact;" value="Impact">Impact</option>
<option style="font-family: System;" value="System">System</option>
<option style="font-family: Tahoma;" value="Tahoma">Tahoma</option>
<option style="font-family: Times New Roman;" value="Times New Roman">Times New Roman</option>
<option style="font-family: Trebuchet MS;" value="Trebuchet MS">Trebuchet MS</option>
<option style="font-family: Verdana;" value="Verdana">Verdana</option>
<option style="font-family: Wingdings;" value="Wingdings">Wingdings</option>
</select>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

The browsers do not apply font rules to select options.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Divya Guttikonda
Ranch Hand

Joined: Mar 09, 2005
Posts: 47
Oh!Thanks i didn't knew that.So is there any other way that i can accomplish this?Please suggest.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

Create your own menu.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Trouble with displaying fonts