change font size

C

charles cashion

I want to use css to change font size in the middle of a sentence.
What I have tried thus far, has added a line feed.
(sort of like plain vanilla <p>)
Thanks,
Charles
 
D

Dan

I want to use css to change font size in the middle of a sentence.
What I have tried thus far, has added a line feed.
(sort of like plain vanilla <p>)

You probably tried using a <div> element which is a block-level
element that defaults to adding a line break (and can't be nested
within a paragraph anyway). What you really want is the <span>
element, which is character-level and can be nested inside a paragraph
and does not imply a line break.
 
J

Jukka K. Korpela

Scripsit charles cashion:
I want to use css to change font size in the middle of a sentence.

Stop wanting that. Changing font size in the middle of a sentence is
disturbing.
What I have tried thus far, has added a line feed.

You did something wrong. (This reply is more specific than your description
of what you did.=

Should you really want to change font size in the middle of a sentence and
nothing else (no hint of any meaning conveyed that way), use

<p>I want to make some words to appear in
<font size="1" style="font-size:6px">a ridiculously small font</font>.</p>

Don't play with <span> if you _really_ want to change font size and you have
no idea of why you are doing that.
 
E

Ed Seedhouse

You probably tried using a <div> element which is a block-level
element that defaults to adding a line break (and can't be nested
within a paragraph anyway). What you really want is the <span>
element, which is character-level and can be nested inside a paragraph
and does not imply a line break.

Actually you probably need some other inline element such as <em>
depending on the meaning of the content. <span> should be used only
when some other semantic and appropriate tag is unavailable.
 
L

Leif K-Brooks

Jukka said:
<p>I want to make some words to appear in
<font size="1" style="font-size:6px">a ridiculously small font</font>.</p>

I would use em units instead so that IE users will be able to make the
text less ridiculously small if necessary.
 
B

Bernhard Sturm

Jukka said:
Scripsit charles cashion:


Stop wanting that. Changing font size in the middle of a sentence is
disturbing.

Why? you don't know what the OT wants to achieve (maybe the OT wants to
create a weighted tag-cloud)?
Should you really want to change font size in the middle of a sentence
and nothing else (no hint of any meaning conveyed that way), use

<p>I want to make some words to appear in
<font size="1" style="font-size:6px">a ridiculously small font</font>.</p>
just out of curiosity: doesn't this contradict the notion, that we
should provide semantically correct structured documents?
font-size="1" together with an inline stlye definition in a document
mixes layout-information with structure IMHO.
Also: font-size:6px is probably not a very good practice as px reflects
an absolute size unit. You would use 'em's instead of px.

And why not use an inline element such as <span> to achieve this effect,
as a previous poster suggested?

cheers
bernhard
 
J

Jukka K. Korpela

Scripsit Bernhard Sturm:
Why? you don't know what the OT wants to achieve (maybe the OT wants
to create a weighted tag-cloud)?

From my years of experience with Usenet, I do. If the OT had a reason, he
would have explained it. That's at least a feasible hypothesis, which is
true in a great majority of cases.
just out of curiosity: doesn't this contradict the notion, that we
should provide semantically correct structured documents?

It's the idea of changing changing font size in the middle of a sentence and
nothing else (no hint of any meaning conveyed that way) that contradicts
that notion. What I propose is a way of being honest about it.
font-size="1" together with an inline stlye definition in a document
mixes layout-information with structure IMHO.

There is no structure, just the OP's desire to change font size.
And why not use an inline element such as <span> to achieve this
effect, as a previous poster suggested?

It would be semantically empty, whereas <font> is honest about the desire to
change font size.
 
B

Bernhard Sturm

Jukka said:
Scripsit Bernhard Sturm:


From my years of experience with Usenet, I do. If the OT had a reason,
he would have explained it. That's at least a feasible hypothesis, which
is true in a great majority of cases.

Do I understand you correct, that you are assuming the OP had no reason
for his question (according to your long-time experience), but you are
providing him an answer anyway?

:)
cheers
bernhard
 
D

dorayme

Bernhard Sturm said:
Do I understand you correct, that you are assuming the OP had no reason
for his question (according to your long-time experience), but you are
providing him an answer anyway?

:)
cheers
bernhard

Bernhard, don't be silly please (that's my role here). JK did not
assume OP had no reason. Obviously he had the simple (if
misguided) reason of wanting to change a font size in mid
sentence. And JK was saying not to do that without further
reason.
 
B

Bernhard Sturm

dorayme said:
Do I understand you correct, that you are assuming the OP had no reason
for his question (according to your long-time experience), but you are
providing him an answer anyway?

Bernhard, don't be silly please (that's my role here). JK did not
assume OP had no reason. Obviously he had the simple (if
misguided) reason of wanting to change a font size in mid
sentence. And JK was saying not to do that without further
reason.
[/QUOTE]

No problem :) I understood JK very well, I was just surprised that he
gave him a solution for his obviously misguided question...

bernhard
 
D

dorayme

Bernhard Sturm said:
No problem :) I understood JK very well, I was just surprised that he
gave him a solution for his obviously misguided question...

Well, fair enough... personally, I don't think it was all that
obviously misguided. Not everyone explains why they want to do
things and it cannot be doubted that there could be good reasons
to do what they wanted. That does not make for too much
obviousness.
 
B

Blinky the Shark

dorayme said:
Well, fair enough... personally, I don't think it was all that
obviously misguided. Not everyone explains why they want to do
things and it cannot be doubted that there could be good reasons
to do what they wanted. That does not make for too much
obviousness.

OP can probably pick up some tips here:

http://www.rogerart.com/

:)
 
E

Ed Mullen

dorayme said:
Well, fair enough... personally, I don't think it was all that
obviously misguided. Not everyone explains why they want to do
things and it cannot be doubted that there could be good reasons
to do what they wanted.

But! But! JK /always/ doubts that there could be *any* reason outside
of his reasoning to warrant any thing not of his devising.

It is, honestly, a tad sad. He is knowledgeable, no doubt. But his
didacticism off-puts to such an extent that his (potentially) useful
advice is oft ignored as the rantings of a sycophant. Hence the real
potential for damage to content by form. Not too much of a problem for
me as I am fairly well able to "consider the source." Newbies who could
benefit most, however, are most likely to be offended by the anti-social
form and ignore the potentially beneficial advice. Or, as Dad used to
say: "If he's acting like an ass, he probably is one most of the time.
Your job is to figure out which is which, when is when, and decide to
listen, laugh, or ignore." And, no, Dad didn't allow for "just shoot
the bastard." Too messy and fraught with legal implications.
 
Joined
Jul 3, 2012
Messages
1
Reaction score
0
One reason to use a small font in the middle of a sentence is to describe a specific time as A.M or P.M., which are usually written as small capitals.
 

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

No members online now.

Forum statistics

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

Latest Threads

Top