[thelist] How excusable is the use of frames?

Steve Cook steve.cook at evitbe.com
Thu Aug 16 06:47:26 CDT 2001


There are however exceptions to frames which allow for the static placement
of certain content and scrolling content for other. However I'm not too sure
that the solution I'm using on our intranet would be suitable for public
applications. 

I'm using a layout that includes a static header to the page and a
scrollable area below (like two frames, one above the other). We do this
using the following CSS:

	/* Upper "frame" */
	.contentTop {
		position:absolute;
		top: 0px;
		left: 0px;
		width:100%;
		margin:0px 0px 0px 0px;
		padding:6px 0px 0px 4%;
		background-color:#eee;
		z-index:1;
		height : 40px;
	}

	/* Lower "frame" */
	.content {
		position:absolute; /* Position is declared "relative" to
gain control of stacking order (z-index). */
		width:100%;
		top: 76px;
		left: 0px;
		margin:20px 0px 0px 0px;
		border:0px solid black;
		background-color:#fff;
		padding:0px;
		z-index:1; /* This allows the content to overlap the right
menu in narrow windows in good browsers. */
	 	overflow: auto;
		height: 80%;
	}

You'll notice the use of "overflow: auto" in the second style. This allows
for the use of a scrollbar. By removing scrollbars from the main page (body
{overflow: hidden;}) it looks like the bottom div is a scrollong frame.

The main problem I've had with this is that using 80% height seems to work
more or less for a "normal" sized window in conjunction with the size of top
div I'm using. However it's not exact. I've wondered about using something
to detect the window size and calculate the style based upon that, but for
our purposes it's "good enough".

The main advantage with this over frames, is that I use two slightly
different style sheets for screen presentation and print. That way all the
header information is printed properly for our users without them having to
worry about opening a print version of the page.

Of course, I also agree that in certain situations frames can be very
useful, but it always pays to look at the alternatives.

.steve



----------------------------
Steve Cook
web strategist
Evitbe AB tidigare Biljettpoolen
031-15 16 17   0703-13 26 31
steve.cook at evitbe.com     www.evitbe.com
---------------------------- 

> -----Original Message-----
> From: Peter-Paul Koch [mailto:gassinaumasis at hotmail.com]
> Sent: den 16 augusti 2001 13:25
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] How excusable is the use of frames?
> 
<SNIP>
> 
> I don't want every single site to use frames, but I would 
> like people to pay 
> attention to the benefits of frames, too. In the end it's 
> your own decision 
> whether to use them or not, and if someone decides to use 
> them, I'd like 
> other people to assume there might be a good reason for it.
> 
> It's just that the "frames are no good" call seems to have 
> become a dogma, 
> and I don't like dogma's.
> 
> ppk
> 




More information about the thelist mailing list