Submit Your Article Forum Rules

Results 1 to 4 of 4

Thread: iFrames and XHTML 1.1 Strict

  1. #1
    Senior Member ADAM Web Design's Avatar
    Join Date
    Dec 2003
    Posts
    2,172

    iFrames and XHTML 1.1 Strict

    Normally, I'd have absolutely no use for frames or iFrames, but for a particular client's site redesign, I need them.

    The problem is that they don't seem to be allowed in XHTML 1.1 strict (along with frames). The question is whether or not there's an equivalent, or if there is a way to "allow" iFrames (and for that matter, the "target=_new" attribute) outside of the "hack" of creating a Javascript using innerHTML to create the iFrame.

  2. #2
    WebProWorld MVP
    Join Date
    Aug 2003
    Posts
    1,039
    Both the target attribute and iframes have been dropped in XHTML1.1.

    From a quick Google I found the following which basically uses an object instead of an iframe:

    <object type="text/html" data="http://www.google.com" width="400" height="500">


    Alternate text</p>
    </object>

    Although this works in Firefox it doesn't seem to want to work in IE (SP2), I've not spent any time on this so there might be an easy fix.

    I'd either go to a DOCTYPE that supports iframe or use a server side script to populate the area.

    Hope that's some help.

  3. #3
    Senior Member paulhiles's Avatar
    Join Date
    Jul 2003
    Posts
    2,073

    Mimicking iframes using CSS

    Do you need the iframe to pull in content from another page?
    Or is it being used to save space in your page layout?

    If it's the latter, then BeforeTheDog's iframe mimics might prove useful.

    If it's the first option, then XHTML Transitional will accept iframes.

    Paul

  4. #4
    Senior Member ADAM Web Design's Avatar
    Join Date
    Dec 2003
    Posts
    2,172
    http://www.kastlefireplace.com/frame...ype=1&PID=1016

    That's the idea behind it. So I guess the answer is #1.

    Of course, this being the only semi-practical use I've ever seen for an iFrame, I can see why they were dropped in 1.1. But if I go XHTML Transitional, won't that cause problems down the road if/when XHTML gets "upgraded"?

    That's why I'm leaning more toward a Javascript hack. I like the idea of going to a manufacturer's page from a product page, but within the site itself so it doesn't get lost.

    The DIV idea would be cool, except for the fact that you can't (to my knowledge) load external site content into a DIV.

Similar Threads

  1. For XHTML Strict, what is the alternative for SELECT in forms?
    By TheBrownRecluse in forum Graphics & Design Discussion Forum
    Replies: 2
    Last Post: 08-03-2007, 05:26 PM
  2. Xhtml strict 1.0 vs xhtml 1.1
    By John-pr in forum Web Programming Discussion Forum
    Replies: 9
    Last Post: 11-08-2006, 02:09 PM
  3. XHTML Strict and links in a new window
    By ADAM Web Design in forum Graphics & Design Discussion Forum
    Replies: 8
    Last Post: 08-05-2005, 10:06 AM
  4. HTML 4.01 Strict
    By freddieb in forum Graphics & Design Discussion Forum
    Replies: 18
    Last Post: 02-14-2004, 02:31 PM
  5. Strict or Transitional?
    By carbonize in forum Graphics & Design Discussion Forum
    Replies: 14
    Last Post: 10-06-2003, 11:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •