Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 04:11 PM
Tom Van Overbeke
Guest
 
Posts: n/a
Default setting font size in a iframe object (which reads a text file)

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.



  #2  
Old July 20th, 2005, 04:11 PM
Jim Dabell
Guest
 
Posts: n/a
Default Re: setting font size in a iframe object (which reads a text file)

Tom Van Overbeke wrote:
[color=blue]
> 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,[/color]

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

  #3  
Old July 20th, 2005, 04:11 PM
Robrecht Jacques
Guest
 
Posts: n/a
Default Re: setting font size in a iframe object (which reads a text file)

Tom Van Overbeke wrote:[color=blue]
> 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 ?[/color]

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


 

Bookmarks

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles