aspose file tools
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

Win a copy of The Software Craftsman this week in the Agile forum!
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: 2370

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 Member of Technical Staff,, San Francisco, 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="" rel="nofollow"></A> <BR>Author of <A HREF="" TARGET=_blank rel="nofollow">Software Architecture: Organizational Principles and Patterns</A><BR><A HREF="" TARGET=_blank rel="nofollow"></A><BR><A HREF="" TARGET=_blank rel="nofollow"></A>
Have you tried LearnNowOnline?
subject: how to manipulate fonts?