Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Changing font in iFrame
11-17-2010, 01:44 AM #1
- Join Date
- Nov 2010
- Thanked 0 Times in 0 Posts
Changing font in iFrame
Okay so I'm trying to get my website to read this text document using iframes, which is working well except that the font is annoyingly notepad-esque (I don't know the exact font name, but one can tell that it is a text document rather than word). I'd prefer it if I was able to view the document in a different font. Is there any way to do this with iframes?
Basic code (ignoring all other aspects) so far:
<html> <body> <iframe ref="comments.txt"></iframe> </body> </html>
I hope that explains the problem...
11-17-2010, 04:14 PM #2
- Join Date
- Mar 2008
- Dundee, Scotland
- Thanked 39 Times in 39 Posts
Because the file is a ".txt" file there will be no way of defining fonts in it. There is no DOM in a plain text file so nothing for the browser to "get hold of".
You could try loading the file into a variable, prepend and append the appropriate html code to it and add in some font code, then make the source of the iframe equal to the content of the variable.