Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > change font size

Reply
Thread Tools

change font size

 
 
charles cashion
Guest
Posts: n/a
 
      03-14-2007
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
 
Reply With Quote
 
 
 
 
Dan
Guest
Posts: n/a
 
      03-14-2007
On Mar 14, 1:24 pm, charles cashion <(E-Mail Removed)> wrote:
> 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.

--
Dan


 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      03-14-2007
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.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Ed Seedhouse
Guest
Posts: n/a
 
      03-15-2007
On 14 Mar 2007 11:02:36 -0700, "Dan" <(E-Mail Removed)> wrote:

>On Mar 14, 1:24 pm, charles cashion <(E-Mail Removed)> wrote:
>> 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.


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.
 
Reply With Quote
 
Leif K-Brooks
Guest
Posts: n/a
 
      03-15-2007
Jukka K. Korpela wrote:
> <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.
 
Reply With Quote
 
Bernhard Sturm
Guest
Posts: n/a
 
      03-15-2007
Jukka K. Korpela wrote:
> 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.


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

--
www.daszeichen.ch
remove nixspam to reply
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      03-15-2007
Scripsit Bernhard Sturm:

>>> 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.

>
> 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.

>> 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?


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.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Bernhard Sturm
Guest
Posts: n/a
 
      03-15-2007
Jukka K. Korpela wrote:
> Scripsit Bernhard Sturm:
>
>>>> 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.

>>
>> 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.
>


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




--
www.daszeichen.ch
remove nixspam to reply
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      03-15-2007
In article <etcc2j$tgn$(E-Mail Removed)>,
Bernhard Sturm <(E-Mail Removed)> wrote:

> Jukka K. Korpela wrote:
> > Scripsit Bernhard Sturm:
> >
> >>>> 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.
> >>
> >> 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.
> >

>
> 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.

--
dorayme
 
Reply With Quote
 
Bernhard Sturm
Guest
Posts: n/a
 
      03-15-2007
dorayme wrote:
> In article <etcc2j$tgn$(E-Mail Removed)>,
> Bernhard Sturm <(E-Mail Removed)> wrote:
>
>>>

>> 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.
>


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

bernhard


--
www.daszeichen.ch
remove nixspam to reply
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Swing Font, it's Java Font? ot native? how install new font? mttc Java 2 07-03-2009 07:29 PM
Printing with specific font-type and font-size wial Java 2 11-27-2008 05:30 PM
Firefox - Prevent TextField size change when user changes font size? Wongod HTML 2 10-04-2006 12:26 PM
Windows XP explorer font and font size Lookout Computer Support 0 06-04-2006 02:58 AM
Selecting font size based on available font dave richards HTML 2 02-19-2004 02:47 PM



Advertisments