Add Formatting to iframe Using HTML & CSS

  • Context: HTML/CSS 
  • Thread starter Thread starter mtanti
  • Start date Start date
  • Tags Tags
    Css Html
Click For Summary

Discussion Overview

The discussion revolves around the use of iframes for displaying formatted content on websites, particularly in contexts where non-technical users need to update text files. Participants explore various methods for applying formatting to iframes and alternatives to using iframes for content inclusion.

Discussion Character

  • Technical explanation
  • Exploratory

Main Points Raised

  • One participant notes that iframes can be beneficial for non-technical users, allowing them to upload plain text files that can be displayed with formatting.
  • Another suggests mimicking an iframe using server-side scripting, such as PHP, to include text from a file directly into the document.
  • A different participant proposes using PHP's "include" function to add a stylesheet to the file being updated, allowing for formatted content.
  • It is mentioned that a standard approach involves pulling text dynamically from XML or a database using server-side scripts like ASP or PHP, which could facilitate content management through forms.
  • Links to external resources are provided for further reading on using iframes with CSS.

Areas of Agreement / Disagreement

Participants present multiple approaches to formatting content in iframes and alternatives to iframes, indicating a lack of consensus on the best method.

Contextual Notes

Some methods discussed depend on server-side scripting capabilities, and there may be limitations based on the specific technologies available to users.

mtanti
Messages
172
Reaction score
0
I once read on a tutorial that iframes are useful when you have non technical people writing text files to update a section of your web site, such as a secratery writing the news section.

There are useful because you just upload a plain text text file to a location and the iframe will have it displayed with formatting. Such as colour, font, background, etc.

How do you apply formatting to an iframe that way?

THANKS!
 
Technology news on Phys.org
Yeah if you have PHP you could use "include" to include a stylesheet to the file you're updating. The file can be a plain PHP page with only text and the include command at the top.
 
The standard way is to pull the text dynamically from XML or a database and write it to the page via a server-side script, like ASP or PHP. The advantage of this is that you can then, for example, make a form that allows you to "post" new, or edit old, content.

But if you want to use IFrames with CSS, then:
http://www.w3.org/TR/html4/present/frames.html#h-16.5
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects/frameset.asp
 
Last edited by a moderator:

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K