473,473 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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.

Jul 20 '05 #1
2 21074
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

Jul 20 '05 #2
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
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
18
by: fleemo17 | last post by:
My organization is developing a set of "standards" for websites built inhouse. The first question that comes to mind is what would be a good standard default size for <p> text? 12 point? Which...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
14
by: Roger Withnell | last post by:
How to I find out what size text the browser is set to? Thanks in anticipation.
0
by: jkristia | last post by:
I'm completely lost right now, and can't figure out how to solve this problem. I want my app and dialogs to show up in the same position and same size as when they were closed. For that I do...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
2
by: EnjoyNews | last post by:
Hi NG I have a site where an invoice is shown on the screen in a IFrame. I have this script on the site: <script type="text/javascript"> function zPrint(oTgt) { oTgt.focus(); oTgt.print(); }
8
by: Jeff | last post by:
ASP.NET 2.0 I'm wondering how to set the color of a visited HyperLinkField (the link text) in a GridView?? Here is the markup of the HyperLinkField I have problems with: <asp:HyperLinkField...
6
by: Steve | last post by:
I have a div with two - three paragrahs in it. Each paragraph has its own inline style tag with its own font size setting. When I set the last paragraph's font size the font sizes for ALL of...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.