Menu

Frame frustration

In general, I’ve avoided the use of frames in the last few years, and I usually recommend others do the same if possible. In fact, I haven’t worked on a frame-based site since we stopped updating Cocktail many years ago.…

In general, I’ve avoided the use of frames in the last few years, and I usually recommend others do the same if possible. In fact, I haven’t worked on a frame-based site since we stopped updating Cocktail many years ago. They often require additional maintenance and file management. And should normally exist alongside <noframes> content for browsers lacking support for frames.

However, I’m working on a client project right now where the use of frames is highly beneficial. No one would say frames are required. But the product is heavily application-oriented. And it benefits from keeping the majority of functionality within one browser window without needing to popup “preview windows” showing completed work on another server.

My frustration comes from the default space all browsers place between frames without use of the presentational attributes framespacing and frameborder on the frameset itself. The IE-proprietary framespacing attribute isn’t allowed in XHMTL Frameset 1.0. (In fact, it’s not even in the HTML 4.01 specification.) And frameborder can’t be paired with the frameset element (which seems to get rid of the even wider spacing in Gecko browsers). Obviously, I’m shooting to avoid invalid markup, let alone the mixing of structure and presentation. But I haven’t figured out a way to eliminate the spacing between frames without those two attributes.

Searches on Google and W3C mailing lists turn up the repetitive unhelpful recommendations of using CSS — which doesn’t seem to apply here. All my attempts to solve the problem this way have failed so far. I’ve tried simple rules like:


frameset, frame {

margin:0;

padding:0;

border-width:0;

border-style:none;

}

but to no avail. Styles seem to have no impact on this ugly spacing issue. Ack! Am I missing something?