Stupid question about fonts.

U

UJ

What's the easiest way (without setting up a style sheet) to set the font
for an area of text. I need to be able to specify the exact font and font
size - not the 1-7 numbers IE uses. I want to be able to set some text to be
Font=Arial, Size=12pt.

TIA - Jeffrey.
 
P

Phillip Ian

You can use style sheet like settings in the style tag of most HTML
elements.

For instance..

<span style="font: 12px arial">This text is in 12 pixel arial!</span>
 
J

Juan T. Llibre

Remember that font tags are on their way to deprecation.

Using a CSS stylesheet is the way to go :

<head>
<link href="default.css" rel="stylesheet" type="text/css" />
</head>

And, in default.css :

body
{
font-size: 0.8em;
COLOR: #000000;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
background-color: #EFEFEF;

}

..txt1 { font-size : 1.0em; }
..txt2 { font-size : 0.9em; }
..txt3 { font-size : 0.8em; }
..txt4 { font-size : 0.7em; }
..txt5 { font-size : 0.6em; }

..txt1Bold { font-size : 1.0em; font-weight:bold; }
..txt2Bold { font-size : 0.9em; font-weight:bold; }
..txt3Bold { font-size : 0.8em; font-weight:bold; }
..txt4Bold { font-size : 0.7em; font-weight:bold; }
..txt5Bold { font-size : 0.6em; font-weight:bold; }

..txt3red { font-size : 0.8em; color: Red; }

etc...
 
S

S. Justin Gengo

Yes,

I'd normally agree. But he specifically said he didn't want to use a style
sheet...

I therefore thought he wanted to do it without styles at all.

Plus, while I realize that font tags are being deprecated it will be a very
long time before all browsers don't include that backward compatability.
That said I probably should have included a "disclaimer" of a sort that said
I don't recommend using font tags. Thanks for pointing that out Juan.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
M

Mr Newbie

I dont think you need a disclaimer. Your post was accurate because as you
correctly point out that he was specific about not using Style Sheets.

Mr N
 
J

Juan T. Llibre

When someone makes a demand for a requisite which goes against
current, or soon to change, standards, it's our duty to inform the poster
of the inadvisability of the path the poster intends to take.

Just because someone specifies that he doesn't want to use
stylesheets when, in fact, stylesheets are the standard to go with,
doesn't relieve us of the duty to make the best recommendation.

Anything else could be referred to as a "bad hack" recommendation.

The solution pointed out by Justin *does* work, btw,
and will work for some time yet, although VS.NET
will complain about it each and every time.

It just depends on how punctilious you want to be... ;-)
 
M

Mr Newbie

'Punctilious' would be an accurate adjective to describe your contributions.
And although this is an admirable quality, I think sometimes people in this
and other similar newsgroups, are overly zealous in this respect; this can
lead to point scoring, and in some cases I've seen it also lead to arguments
and hurt feelings in the less robust contributors.



The point of my reply was only to backup the author of the reply to the
effect that his post was both accurate and reflected exactly what the OP
asked for, and not to rubbish your contribution in any way. This is the
second time you have demonstrated your sensitivity to what you obviously see
as criticism.



From what I have seen of your posts so far, I have always felt that you
present a cogent argument and are most helpful. It's fine in my opinion to
go the extra mile to answer a question, but I think to call it a duty is
probably a little over the top.



Just chill out a bit ;-)



Regards - Mr N
 
J

Juan T. Llibre

re:
This is the second time you have demonstrated your sensitivity to what you obviously see
as criticism.

I didn't see it that way.

You did ?

If so, I don't know how else to mark my posts
so that such an interpretation is not possible.

I don't know. I just write in reaction to what I read.
I assume people here know that the intention is a good one.

re:
The point of my reply was only to backup the author of the reply to the effect that his
post was both accurate and reflected exactly what the OP asked for, and not to rubbish
your contribution in any way.

I didn't interpret your post to mean that you thought
my contribution was deserving of being "rubbished".

Why would you believe that ?

re:
reflected exactly what the OP asked for

I consider it *my* duty to set the OP straight if his request
overflows the bounds of good programming practices.

I understand if you want to go with the flow of a request, though.

re:
I think to call it a duty is probably a little over the top.

For you it might be a little over the top. For an MVP it's not.

re:
Just chill out a bit ;-)

Sure, if you'll do that, too ... ;-)

Sorry if I perturbed you. I sure didn't mean to.
 
M

Mr Newbie

For you it might be a little over the top. For an MVP it's not.

Ahh!, yes, I forgot I wasnt one of them, thanks for pointing out my low
class status.


Keep up the good work !


Mr N
 
J

Joel Aufgang

What is all the hullabalo about this simple question?

You can use CSS styles on any tag without actually setting up a seperate
CSS sheet. Just use the style attribute to specify the style inline. That
way you avoid using the deprecated font tag and dont have to deal with
having a seperate .css file.

<div style="font-size:25px;font-family:Times"> Blah Blah Blah</div>

This is elementary HTML people.
 
J

Juan T. Llibre

re:
Ahh!, yes, I forgot I wasnt one of them

From what I've seen of your posts, if you maintained a high level
of involvement here for at least a full year, you could very easily
become an MVP, but you'd have to drop your "Mr. Newbie" signature.

re:
thanks for pointing out my low class status.

You can consider yourself to be anything you want to consider yourself as.
That doesn't mean that *I* consider that you are "low class".

My comment has *zero* reflection on "class status".
Why would you believe that it does ?

MVPs *normally* hold themselves to a higher standard
that the average poster in the newsgroups.

We have to do that, because any slacking
down of those standards opens a can of worms.

That's par for the course, and that attitude
has no implications about any other peer here.

Your wise advice to "chill out" should be good for you,
too, but if you want to flame me further, go ahead,
but I won't respond any more, if your reply is another flame.

OTOH, if you have any kind of question for which I can give you
a good pointer to an answer which involves the best possible
programming standards, just post it.

I may, or may not, be able to help you, but if I post an answer you can
be assured that it will reflect the highest possible programming standards
which I have learned, even if you think that pointing out those standards,
somehow, makes you feel "low class".

That is not my problem. It's yours.
 
J

Juan T. Llibre

re:
What is all the hullabalo about this simple question?

I don't know what all the hullaballoo is about, either.
You are absolutely right and I am right, too.

I do think, however, that using a stylesheet is vastly preferrable
to including inline style code in each and every page,
increasing the load factor for the server.

*That* is why separate stylesheets are recommended.

I don't think Justin has a problem with that, either.
Justin's reply was very precise, and very correct, too.
 
M

Mr Newbie

This is exactly what I mean. I meant to be tongue in cheek, yet you have
taken it to be deadly serious.



Let me end this now by just saying that I am sure you are very professional,
I have no axe to grind, and that my posts are in essence light hearted.



I perhaps should remember that plain text does not always convey the true
spirit in which a note is written, and therefore I should take more care
when making my replies, be more serious and use emoticons and more upbeat
phrasing.



If I have offended you then I apologise. I have posted a question on
ErrorPage attributes, perhaps you could help me with this, as I am sure I
have done something really stupid but cant see it.





Thanks and Regards Mr N.
 
J

Juan T. Llibre

re:
plain text does not always convey the true spirit in which a note is written

That is so true.

re:
use emoticons

Sometimes they help... ;-)

re:
If I have offended you then I apologise.

You have nothing to apologize for.
You did not offend me, and I certainly hope I didn't offend you.

I only wondered what had I done.
I understand better what went down now.

Let's move forward, OK ? No harm done, I hope.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top