[111Design.ca]

111Design Consulting

Supporting Industry Standards and Accessibility [Navigation]

Menu

[toxic waste]

design tips

You are here:  Design Tips » Frames and Inline Frames

tip#4

Frames and Inline Frames

A framed Site consists of two or more HTML pages spliced together in a manner that leaves a menu or some other portion of the page fixed in respect to the viewport. The frame containing the main content usually scrolls. An Iframe is a file (usually an HTML page) stuffed inside another HTML page. Iframes and their content are not visible in browsers that don't support them.

If you feel that you must use frames of any sort, or a client insists on having them, be sure to include the noframes tag. This way, old browsers and Search Engines can access them. One of the biggest problems with a framed Site is, pages are indexed individually by Search Engines. You can't count on visitors coming in through the frameset page. If your site's navigation menu is in seperate frame, they are going to be stranded. There should be a link back to your Home page (or Site Map) on every page of your Site. Ideally, each page should contain a "breadcrumb trail"—especially if the links are deeply nested. Confusing navigation is a turn-off to most visitors.

Another problem is the way they display (or fall apart) on different screen resolutions. If the Site was designed for a high screen res and one or more frames have scrolling disabled, these frames will appear cut off. Large default font sizes and browser toolbars can take up a lot of screen area too.

Don't try to force pages into their frameset with javascript. It will cause some browsers to crash. Doing this will also make pages impossible to bookmark. And if you should forget to target a link, the whole frameset will load inside one of the frames! It won't work at all in browsers with javascript turned off.

The proper syntax for targeting external links (links to Websites outside your domain) is: target="_top" (reuse window) or target="_blank" (launch new window). If you do nothing, the Site will get loaded into your frameset... and I can tell you it's owner won't be happy. If the designs look similar, he could sue for copyright infringement.

Incidentally, you should never use javascript to launch a new window. The link won't work in non-java browsers (Search Engine spiders included) or browsers with javascript disabled.

Choose one of the following DTD's for a Site that uses frames:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

(The target attibute is not allowed in XHTML 1.0 Strict.)


Copyright © 2003-2009, 111Design.ca