473,513 Members | 2,319 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Defining fonts?

HI:
I'm a total newby at this:

In order to have some consistency of fonts used on my web site, I wrote a ccs.
There are about 20 entries, all variations (bold; bold larger; colorerd; italic;
underlined etc) - you get the idea.

They are all using one font (Arial).

This means the phrase "Font Family: Arial;" is in each definition.

Is there a way whereby I can use a common code (such as Font Family: "font#1"
and then define this "font#1" on a separate line?

If so, could I define a number of them as "font#1, and the rest as "font#2".

That way, if I wanted to try and see what my site would loook like in a
different font, I would have to make one change only in the ccs file, rather
than about 20.

Perhaps, I'm asking for the impossible, but it's worth a try . . . .

Thanks!

John <><

A wise monkey is a monkey who doesn't monkey
with an other monkey's monkey.
Sep 1 '05 #1
2 1673
John wrote:
HI: I'm a total newby at this:

In order to have some consistency of fonts used on my web site, I
wrote a ccs. There are about 20 entries, all variations (bold; bold
larger; colorerd; italic; underlined etc) - you get the idea.

They are all using one font (Arial).

This means the phrase "Font Family: Arial;" is in each definition.


body {
font-family: arial, sans-serif;
font-size: 100%; /* so users get their own preference */
}

...then delete all that stuff within your HTML. Setting your suggested
font in the CSS's body will cascade to all children of body. Don't
forget the generic fallback.

--
-bts
-This space intentionally left blank.
Sep 1 '05 #2
On Wed, 31 Aug 2005 20:46:46 -0400, John <no****@nospam.ca> wrote or
quoted :
That way, if I wanted to try and see what my site would loook like in a
different font, I would have to make one change only in the ccs file, rather
than about 20.


The key to this is applying a font property to a list of selectors in
one place and the other properties in another. That way you need
specify the font only once.

e.g.

..plum,.strawberry,.blackberry{ font-family: Arial, sans-serif };
..plum { font-size: 1.2 em };

..strawberry,blackberry ( color: red; }

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Sep 2 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3329
by: Jack Charbonneau | last post by:
I have a bunch of custom fonts installed on my system. For instance if I look at the font drop-down in word pad I see about 90 fonts, but if I build an app using VS.Net, add a label, and try to...
38
8673
by: Ted | last post by:
Is there a way to define a constant value for a color in a CSS declaration? I have numerous colors in different CSS elements, and if I make a change in color, I have to change all the reference...
0
3387
by: LaidBack Bill | last post by:
My application allows the user to select fonts. I fill in a combo box control with the available fonts by looping through all System.Fonts: ' Get all the screen fonts ReDim...
4
11953
by: L | last post by:
Hi there, Does C# support OpenType fonts? My c# application is not recognizing OpenType fonts. Thanks, Lalasa.
4
3641
by: Aaron Gray | last post by:
Is there anyway to get a list of all the availiable fonts in Javascript ? Aaron
2
2919
by: Luc | last post by:
I saw a few posts on this newsgroup about it but nothing to help me resolve this problem: We designed a window in .NET on a platform using small fonts (120 ppp). But this window will run on...
1
3246
by: Atul | last post by:
Hi, I have installed a truetype font (.ttf) on a linux machne (SUSE linux 10, KDE) by copying it to my .fonts folder. I can use the font in all applications like open-office and firefox browser....
8
6530
by: traditore | last post by:
Hello. I'm trying to load fonts in a web page using "style" tag. The TTF files are in other page whose URL is, for example, "http://myURL/fonts". The HTML code is something like: <html>...
12
2327
by: ctclibby | last post by:
Hi all Have a customer that wants a specific font included in her web page design; Comic Sans MS. This is one of the MS core fonts. The problem I have is that some of the *nix browsers do NOT...
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7559
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4756
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.