Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > setting font size in a iframe object (which reads a text file)

Reply
Thread Tools

setting font size in a iframe object (which reads a text file)

 
 
Tom Van Overbeke
Guest
Posts: n/a
 
      07-11-2003
Hi,

I created a web page that displays a logfile monitor i wrote for monitoring
our servers. it refreshes every minute and displays a text file in an
iframe. I'd like to reduce the font size so that more info fits in the text
box, but i'm not too savvy in html, and the <font> tag doesn't seem to work
here. does anyone know how to change the size (and if possible also the
font) of the file (reverse-swatch.txt) that is loaded in the iframe ?

this is my code:

<html>
<head>
<title>Logfile Analyzer</title>
<META HTTP-EQUIV="REFRESH" CONTENT="60">
</head>
<body>
<iframe src="reverse-swatch.txt" width="100%" height=180>
</body>
</html>


TIA,


Tom.



 
Reply With Quote
 
 
 
 
Jim Dabell
Guest
Posts: n/a
 
      07-11-2003
Tom Van Overbeke wrote:

> I created a web page that displays a logfile monitor i wrote for
> monitoring our servers. it refreshes every minute and displays a text file
> in an iframe. I'd like to reduce the font size so that more info fits in
> the text box,


As far as I am aware, this is impossible. CSS and HTML styling doesn't get
passed down to an <iframe> element's contents, and you can't style a
plain-text file.

One option that may be suitable is encoding your text file as an HTML file,
and styling the text within that.

--
Jim Dabell

 
Reply With Quote
 
 
 
 
Robrecht Jacques
Guest
Posts: n/a
 
      07-11-2003
Tom Van Overbeke wrote:
> I created a web page that displays a logfile monitor i wrote for
> monitoring our servers. it refreshes every minute and displays a text
> file in an iframe. I'd like to reduce the font size so that more info
> fits in the text box, but i'm not too savvy in html, and the <font>
> tag doesn't seem to work here. does anyone know how to change the
> size (and if possible also the font) of the file (reverse-swatch.txt)
> that is loaded in the iframe ?


AFAIK with CSS you can't access the elements inside your iframe to style
them. It may be possible with JavaScript (via
document.frames('myframe').document.all), but I dunno.

Maybe the easiest thing to do is to convert the .txt in a .html document:
<html>
<head>
<title>My logfile</title>
<style type="text/css">* { font-size: 8pt; }</style>
</head>
<body>
<pre> <!-- here comes the content of reverse-swatch.txt --> </pre>
</body>
</html>

Robrecht


 
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
Driver no longer reads burned cd's when they are loaded BUT still reads manufactured cd's no prob JD Computer Support 5 04-14-2005 01:50 AM
How to get the text in html tag.like<div...><font...>Text</font></ =?Utf-8?B?Tmlja3k=?= ASP .Net 2 02-20-2005 03:03 PM
Selecting font size based on available font dave richards HTML 2 02-19-2004 02:47 PM
Get form values from iframe (1) to iframe (2) inside a layer in iframe (1) Daedalous Javascript 3 01-16-2004 11:08 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57