[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

IFRAME Font Problem

Posted on 2006-05-25
16
Medium Priority
?
407 Views
Last Modified: 2013-12-03
Hi,
I have a IFRAME where i load HTML contents. The HTML contents in that IFARME is as follows...
------------------------------------------------------------------------------------------------------------------------------------------
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    <link rel="stylesheet" href="/global/style.css">
  </head>
  <body class="editor">
    <introduction>
<P>
        <STRONG>Stream Information</STRONG> </P>
<P>
        <br>The stretch of the East Carson River that many fly fish is from Hangman's Bridge on Hwy 89 downstream 11 miles to the Nevada boarder. As it flow northeast by the small village of Markleeville it heads out into 'no-mans-land' which helps protect it from the masses. Wild trout can run 15 to over 20 inches making this a favorite fishery for many fly flickers. </P>
<P style="MARGIN-TOP: 0px">
        <br>
        <STRONG>Article<br><IMG src="../images/bulletcontent.gif"></STRONG>
        <A href="http://www.fishsniffer.com/dbacher/072701ecarson.html">
          <FONT>Three Unique Trout Fisheries In One Stream</FONT>
        </A>
        <FONT color="#000000"> <EM>By: Dan Bacher</EM>. Courtesy of the </FONT>
        <A href="http://www.fishsniffer.com/">
          <FONT>Fish Sniffer</FONT>
        </A>
        <FONT> site.</FONT>
      </P>
<P style="MARGIN-TOP: 0px">
        <FONT></FONT>
      </P>
<P style="MARGIN-TOP: 0px">
        <STRONG>East Carson Maps</STRONG>
      </P>
<P style="MARGIN-TOP: 0px"><IMG src="../images/bulletcontent.gif">Courtesy of the <A href="http://www.flyfishnorcal.org/php-nuke/photopost45/showphoto.php/photo/1472/password//sort/1/cat/517/page/1">Flyfishnorcal.org</A> site.</P>
<P style="MARGIN-TOP: 0px"><IMG src="../images/bulletcontent.gif">Courtesy of the <A href="http://www.fishsniffer.com/maps/ecarson.html">Fish Sniffer</A> site.</P>
    </introduction>
  </body>
</html>
------------------------------------------------------------------------------------------------------------------------------------------

Now after editing the IFRAME contents i request the contents again back with out modifying anything. It gives me all the <FONT> tags that has empty attributes as <FONT size=+0>. For Ex in above snippet i get <FONT size=+0>Three Unique Trout Fisheries In One Stream</FONT>.
so why does Iframe automatically adds this? can i avoid it? if i can avoid it what is the command that should be used? if i cant avaoid it then what can be the solution?

Thanks in Advance,
Regards,G.
0
Comment
Question by:gcmachel
  • 5
  • 3
  • 3
  • +2
13 Comments
 
LVL 30

Expert Comment

by:Irwin Santos
ID: 16766228
perhaps your style shee is not completely configured.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 16766268
gcmachel,

The font tag is deprecated and I would not use it.  Being depracted means that browsers do not have to support it anymore and that may related to the problem you have.  Use style sheets to replace the font tag.

To do this you can include the style attribute in the existing tag ...
   <p style="color: red; font-size: 12pt; font-family: Verdana;">

If this can't be done in the tag then you could use the inline tag SPAN to add style ...
   <p> This is <span style="font-weight: bold">important</span></p>

You can also specify style in the head section of the HTML page with the style tag or by referencing an external style sheet.  Let me know if you want examples of either of these methods.  The sites A List Apart or CSS Zen Garden have some good information on style sheets.

b0lsc0tt
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 16766453
The solution to this is fairly easy, when ou specify a paragraph tag, you  need to specify a FONT type, so use this exampe --

<FONT color="#000000" style="font-size:17px" face="Times New Roman">

<FONT color="#0000AA" style="font-size:15px" face="Arial">

then close the font tag at the end of the paragraph.  HTML expects you to do this so you should specify a font or a list of fonts at the start of a paragraph, or any significant body of text.  ALL font declarations are absent in your code, that is the problem.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:zawedikian
ID: 16767467
hi

if you just dont want the iframe to add size=0 , just delete all the <Font> </Font> you have and that u wrote nothing in them. they are actually totally unecessary. you can just write without them. why did u add them at the first place?


zeina
0
 
LVL 4

Author Comment

by:gcmachel
ID: 16775452
Hi, Actually I am not doing this adding FONT. Actually IFRAME editor adds this to me. So let me know how can i avoid this. if it adds an empty tag also let me know a reg expression so that if there is an empty <FONT> tag i will remove this and subsequent </FONT> tag has to be removed but with out changing the text inside to it.
Regards, G
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 16777431
Maybe you need to set the font type with IFRAME editor before you do the text, perhaps that is why is is adding blank font tags.

Any <FONT> text </FONT> tag group is meaningless to HTML unless something is specified in the tag, so you can remove ALL matching pairs where nothing is specified.  But keep them in sequence.  if there are dual tags, like --

<FONT color="#000000"><FONT>Fish Sniffer</FONT></FONT>

then you would only remove the INSIDE pair, as the outside pair is valid.  I think you should look more closely at the program though, I think it is expecting you to set color, font face and font size in the dialog boxes, then it will write the proper tags to the output.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 16785999
Is IFRAME editor a program that you are using?  If so, then I would recommend not using it or at least editing the HTML code it produces.  If you choose to edit it you should get rid of the font tags, especially since they don't do anything in the code.  You should also get rid of the "introduction" tag, which does not exist in HTML.  The results should look something like below:

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    <link rel="stylesheet" href="/global/style.css">
  </head>
  <body class="editor">
<P>
        <STRONG>Stream Information</STRONG> </P>
<P>
        <br>The stretch of the East Carson River that many fly fish is from Hangman's Bridge on Hwy 89 downstream 11 miles to the Nevada boarder. As it flow northeast by the small village of Markleeville it heads out into 'no-mans-land' which helps protect it from the masses. Wild trout can run 15 to over 20 inches making this a favorite fishery for many fly flickers. </P>
<P style="MARGIN-TOP: 0px">
        <br>
        <STRONG>Article<br><IMG src="../images/bulletcontent.gif"></STRONG>
        <A href="http://www.fishsniffer.com/dbacher/072701ecarson.html">
          Three Unique Trout Fisheries In One Stream
        </A>
        <EM>By: Dan Bacher</EM>. Courtesy of the
        <A href="http://www.fishsniffer.com/">
          Fish Sniffer
        </A>
         site.
      </P>
<P style="MARGIN-TOP: 0px">
        <STRONG>East Carson Maps</STRONG>
      </P>
<P style="MARGIN-TOP: 0px"><IMG src="../images/bulletcontent.gif">Courtesy of the <A href="http://www.flyfishnorcal.org/php-nuke/photopost45/showphoto.php/photo/1472/password//sort/1/cat/517/page/1">Flyfishnorcal.org</A> site.</P>
<P style="MARGIN-TOP: 0px"><IMG src="../images/bulletcontent.gif">Courtesy of the <A href="http://www.fishsniffer.com/maps/ecarson.html">Fish Sniffer</A> site.</P>
  </body>
</html>
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 16786203
I already said that in my above comment, but thanks for agreeing.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 16786282
@scrathcboy - Thanks but I was actually providing details to my first comment and his reply and also asking about iFrame Editor.  I have actually recommended not using the font tag at all and provided an alternative to it in my first comment.  The example in my most recent comment does not include the font tag at all.  My intention was not to agree with you and I'm sorry if it seemed like I was repeating your comment.
0
 
LVL 4

Author Comment

by:gcmachel
ID: 16789186
Ok Guys,

This Editor i am not using as i am developing some work which will allow users to modify the HTML content. So its not me creating the <FONT></FONT> empty tags. So why does IFRAME does that and how should i make IFRAME avoid using that? So the question is
1. IFRAME shouldnt create those Empty tags.
2. If it creates that what is the code should i play with javascript to get rid of the empty <font> tags.

Hope this explains.

Regards,G
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 16791518
We understand that you are not writing the font tags and it is done by some program.  If the code is being generated by a program then it needs to be corrected on that side.  IFrame is just an HTML tag and can't ignore or change code.  I don't believe developing something in JavaScript would be a good solution, even if you can do it.  If the program is yours (you designed it and have the code) then you should be able to correct it.  The information we have provided in this post should give you an idea of what the code should be like.  You could use that information to change what the program is producing.

If you did not write the program then hopefully the program will have a setting to change as Scrathcboy mentioned.  Look at the program's documentation or Help to get information on this.  Contact the program maker's support for additional information.  If you let us know the name of the program and its maker then we may be able to help.

Let me know if you need some clarification or have a question about any of this.
0
 
LVL 4

Author Comment

by:gcmachel
ID: 16831976
Hi,

There is no code i have done in that. Its all a pure HTML <IFRAME> code that gives me the output. So what is the setting i need to do to avoid it adding this <FONT> tag. Why does IFRAME do this. Also are there available free HTML editors which produces a neat Well formed HTML code.

Regards,G
0
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 2000 total points
ID: 16838447
gcmachel,

You can use Window's Notepad to edit and save your html file.  If you want a better editor then you could search the Internet or ask a seperate question for suggestions from experts.  I use Homesite by Macromedia.  Another popular program is Dreamweaver, also by Macromedia.  If you decide to search the Internet then you could look for the phrase "html editor".

Use one of these programs to correct the HTML code.  I have mentioned this before but IFRAME DOES NOT, REPEAT NOT, PUT IN OR INSERT THE FONT TAG.  Using the samples and information we provided above you can edit the html code with Notepad or an HTML editor program.  I recommend completely removing the font tags.  I modified your code in one of my earlier comments if you wish to use that.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Suggested Courses
Course of the Month19 days, 11 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question