wood burning stoves
The moose likes HTML, CSS and JavaScript and the fly likes how to manipulate 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 "how to manipulate fonts?" Watch "how to manipulate fonts?" New topic

how to manipulate fonts?

Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2373

How can i give a specific font face,size,color in JavaScript?
document.fgColor = "blue"; means foreground color of all fonts but i want some particular fonts to manipulate as we did in HTML thru "<font face color size>Some</font>"....anyone help...
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!

Ashik Uzzaman
Senior Software Engineer, TubeMogul, Emeryville, CA, USA.
David Kane
Ranch Hand

Joined: Sep 20, 2001
Posts: 65
There is a pretty good example of this at:
There are two keys to this code, that address your concern. First, use a DIV with ID attribute around the text you want to alter.
Second, the following line, gets this object and alters its CSS properties. The following line from the page above illustrates this.
Good luck!
David Kane
Author of Software Architecture: Organizational Principles and Patterns

David Kane<BR> <A HREF="mailto:david_kane@houseofyin.com" rel="nofollow">david_kane@houseofyin.com</A> <BR>Author of <A HREF="http://www.amazon.com/exec/obidos/ASIN/0130290327/ref=ase_electricporkchop/103-0514572-3811868" TARGET=_blank rel="nofollow">Software Architecture: Organizational Principles and Patterns</A><BR><A HREF="http://www.vraps.com" TARGET=_blank rel="nofollow">http://www.vraps.com</A><BR><A HREF="http://www.houseofyin.com" TARGET=_blank rel="nofollow">http://www.houseofyin.com</A>
I agree. Here's the link: http://aspose.com/file-tools
subject: how to manipulate fonts?
It's not a secret anymore!