You are here: Re: WIDTH attribute for peformatted text « HTML « IT news, forums, messages
Re: WIDTH attribute for peformatted text

Posted by Jonathan N. Little on 10/01/05 07:27

Jud McCranie wrote:

>>OK, then what is the best way to have fixed-width text, with a
>>parameter telling the width of the line (so the browser can adjust the
>>size to get wide lines all on the screen)?
>>---
>
>
> I should explain what I'm doing. I'm trying to make a program
> generate HTML output for its reports. They all need fixed-width
> fonts.

Style it, example;
PRE { font-family: courier, "courier new", monospace; }

Some of the reports range from 75 to 132 characters wide. I
> want the recipient of the HTML file to be able to view the file
> without any horizontal scrolling, and also to have it nearly fill the
> width of the screen, no matter what screen resolution the recipient
> has, etc. I've found out about setting the font size in <P style
> ...>, but I don't know how to make it be the appropriate size. (<pre>
> is listed as depreciated, but I don't know what replaces it.)

PRE element is not deprecated, the 'width' property is. Not use what you
mean, do you want to scale the actual font size to fit the browser
window regardless of window size? If you, not really without some wild
JavaScript. I think not very practical. If the report is 132 characters
wide many folk are going to have to horizontal scroll unless they have a
large monitor at greater than 800x600 res. If they can alway +/-
there browser text size Moz/Firefox CTL + or CTL - if they wish.

> How can I do that?
> ---
> Replace you know what by j to email


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация