Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Static Font Sizes

Reply
Thread Tools

Static Font Sizes

 
 
BGW
Guest
Posts: n/a
 
      07-07-2003
Hello-
I'm brand spankin' new to both these forums and HTML coding, so please
be gentle. . .

How can I create a static font size? I've got several tables(within
tables, withing tables. . .) on a page, and while my main text can be
viewed clearly regardless of whether the viewer has their browser font
size set to smallest or largest, I need to keep certain text a static
size so as to fit within a very specific area on screen. When I set
my browser to "smallest," the text has weird breaks in it, when I set
it to "largest," it oozes onto multiple lines with more weird breaks
(my boss wants it on two lines, and two lines only!!!).

I'm programming with Arachnophilia, and am operating on about a third
grade level =P, so any assistance would be very much appreciated.

tia,
-bgw
 
Reply With Quote
 
 
 
 
Matthias Gutfeldt
Guest
Posts: n/a
 
      07-07-2003
BGW wrote:
> Hello-
> I'm brand spankin' new to both these forums and HTML coding, so please
> be gentle. . .


OK, we'll let the white-hot iron cool off for a full three seconds.
We're soft like that.


> How can I create a static font size?
> (my boss wants it on two lines, and two lines only!!!).


You shouldn't do this terrible thing to your poor unsuspecting visitors!
But if you must, you can indeed try to make it more inconvenient for
your users to resize the font-size and force a certain text-flow onto
them. Here's a solution that might work in some CSS-aware browsers:

<p style="font-size:10px; white-space:nowrap">I should know better but
this is <br>a 10px text distributed over two lines.</p>

Ideally you'd put the style in an embedded or linked stylesheet, but
since you're using nested tables, it really doesn't matter one way or
the other.


Matthias

 
Reply With Quote
 
 
 
 
PeterMcC
Guest
Posts: n/a
 
      07-07-2003
BGW wrote:
> Hello-
> I'm brand spankin' new to both these forums and HTML coding, so please
> be gentle. . .
>
> How can I create a static font size? I've got several tables(within
> tables, withing tables. . .) on a page, and while my main text can be
> viewed clearly regardless of whether the viewer has their browser font
> size set to smallest or largest, I need to keep certain text a static
> size so as to fit within a very specific area on screen. When I set
> my browser to "smallest," the text has weird breaks in it, when I set
> it to "largest," it oozes onto multiple lines with more weird breaks
> (my boss wants it on two lines, and two lines only!!!).
>
> I'm programming with Arachnophilia, and am operating on about a third
> grade level =P, so any assistance would be very much appreciated.
>


To set the font size use px - for instance the following would fix the
contents of the span at10px
<span style="font-size: 10px">Contents</span>

BUT

This is a *very* bad thing to do - tell your boss and quote the other
responses that this thread will surely bring when you're telling him/her.

The reason people use "larger" or "largest" is because they can't read the
text at the normal size - you will ensure that these people can't read your
web pages if you make it so that they can't use their resize option. It is
worth noting that it is *their* resize option and designers have no business
messing with visitors browser functionality.

And it's not just those with a visual handicap - look at the size of a pixel
on a 640x480 monitor and then look at a pixel on a 1600x1200 screen -
there's almost a 3-to-1 proportional difference. Make the text the right
size for a 1600x1200 screen and it's 3 times too big on a 480x640 screen;
make it right for the 640x480 screen and it's now unreadably small on the
1600x1200.

Alternatively, don't fix the size and work on the basis that the user knows
better than the designer what size is comfortable for them to read.

So, ask the boss which they'd prefer - text that fits on two lines or text
that is readable - it's a simple enough choice. And, if they get the answer
wrong, you could mention that the accessibility issue can, in the right
circumstances, put the site on the wrong side of the law. In the US, for
instance, see http://www.humanfactors.com/downloads/thelaw.asp - and run
this quote from that page past them "It should be noted that organizations
concerned with various disabilities have filed lawsuits against commercial
entities over the issue of Web accessibility."

Use % or ems and your text will resize in proportion to the user's
preference - 100% is the default to which they've set their browser so
larger text is a set at, say, 120% and T&C stuff can go to 90%... The em is
sized at the visitors browser setting, so 1.2 em =120% and so on.

BTW - I do appreciate that you're just the messenger - it's not supposed to
be a rant at you Best of luck with the boss.

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

 
Reply With Quote
 
PeterMcC
Guest
Posts: n/a
 
      07-07-2003
BGW wrote:
> Matthias Gutfeldt <> wrote in message
> news:<bec0i3$3dtu0$>...
>> BGW wrote:
>>> Hello-
>>> I'm brand spankin' new to both these forums and HTML coding, so
>>> please be gentle. . .

>>
>> OK, we'll let the white-hot iron cool off for a full three seconds.
>> We're soft like that.
>>

> Aw gee. . .make a girl blush! = )
>
>>
>>> How can I create a static font size?
>> > (my boss wants it on two lines, and two lines only!!!).

>>
>> You shouldn't do this terrible thing to your poor unsuspecting
>> visitors!

> It's not for the body text - it's for a sort-of logo. . .
>

You could alsways do it as a graphic with appropriate alt text for those who
don't see graphics.

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

 
Reply With Quote
 
BGW
Guest
Posts: n/a
 
      07-07-2003
<snip>
> So, ask the boss which they'd prefer - text that fits on two lines or text
> that is readable - it's a simple enough choice. And, if they get the answer
> wrong, you could mention that the accessibility issue can, in the right
> circumstances, put the site on the wrong side of the law. In the US, for
> instance, see http://www.humanfactors.com/downloads/thelaw.asp - and run
> this quote from that page past them "It should be noted that organizations
> concerned with various disabilities have filed lawsuits against commercial
> entities over the issue of Web accessibility."
>
> Use % or ems and your text will resize in proportion to the user's
> preference - 100% is the default to which they've set their browser so
> larger text is a set at, say, 120% and T&C stuff can go to 90%... The em is
> sized at the visitors browser setting, so 1.2 em =120% and so on.
>
> BTW - I do appreciate that you're just the messenger - it's not supposed to
> be a rant at you Best of luck with the boss.


I agree with you. For the rest of the site, I'm only using %, and
trying to map out the text so that enlarging it doesn't whack-out the
rest of the cisual. . .

My boss is. . .well, she has a visual "ideal" and absolutely no
technical expertise whatsoever. . . so the project is getting funner
and funner as I inch closer and closer to the far extremities of my
capability. . . the only way to keep a step ahead is through the
assistance of you fine technically supportive people. . .

Thanks for all the help!! = )
 
Reply With Quote
 
Jacqui or (maybe) Pete
Guest
Posts: n/a
 
      07-07-2003
In article < >,
says...
> Matthias Gutfeldt <> wrote in message news:<bec0i3$3dtu0$>...
> > BGW wrote:

.... ('fixed' font sizes)
> >
> > You shouldn't do this terrible thing to your poor unsuspecting visitors!

> It's not for the body text - it's for a sort-of logo. . .
>

....
px sizing for fonts is only useful for lining text up with images [1],
so it seems a reasonable to use that method for a logo (at least no
worse than using an image, which is the usual way).

[1] except that some browsers resize px-sized text without resizing
images, which IMHO is a bug.
 
Reply With Quote
 
Matthias Gutfeldt
Guest
Posts: n/a
 
      07-08-2003
BGW wrote:
> It's not for the body text - it's for a sort-of logo. . .


Ah! OK! A logo should always look the same. For logos, even if they're
just sort-of, the usual solution is an image, because (as you might have
noted in this thread) you don't have control over appearances if you use
HTML&CSS. Create an IMAGE of the text, in the right font, the right
size, color, whatever special effects that logo needs. And of course
don't forget to supply the appropriate ALT and/or TITLE attribute values.


>><p style="font-size:10px; white-space:nowrap">I should know better but
>>this is <br>a 10px text distributed over two lines.</p>

>
> I'm not really CSS-savvy. . . can I just pop that code into my HTML
> code, even if I'm not using CSS (yet - working on the learnin')?


Yes. Just copy&paste the paragraph into your HTML code. You can replace
the Paragraph element with whatever other element you had in mind.


Matthias

 
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
Re: Win 7 changing font sizes without icon sizes? why? Computer Support 0 03-21-2010 11:32 AM
Re: Win 7 changing font sizes without icon sizes? why? Computer Support 0 03-21-2010 11:31 AM
Swing Font, it's Java Font? ot native? how install new font? mttc Java 2 07-03-2009 07:29 PM
The File Sizes of Pictures on my CDs Increased to Unreadable Sizes Marful Computer Support 11 03-08-2006 07:13 PM
Multiple font sizes in single .ASP Table cell coleenholley ASP .Net 5 01-21-2004 06:28 PM



Advertisments