Click to See Complete Forum and Search --> : Calling the Gurus - Another FRAMES question


vincentms
05-11-2003, 01:46 PM
Hello all,

I'm back, I stuck again! ****.

Please look at the code below and tell me why it works only 60% of the time. Sometimes it works OK, and other times it get the infamous "error on page" message. I am using frames ONLY because I wanted the header to be "frozen" on the screen. Perhaps there is a way to do this WITHOUT USING FRAMES, this "Freeze Pane", for those of you familiar with MS-EXCEL.

In any case, I am trying to hold the header so it would always be displayed (some Images, Text and a Button or two) even if the user scrolls down the page. So, Exam1.html is just the header.


Any thoughts?

Thanks and kind regards,
Vincent
Zürich, Switzerland


P.S., Happy Mothers day to those to whom it applies!



<html>

<head>
<title>Exam Simulator</title>
</head>

<frameset name="ExamFrames" rows="23%,77%" BORDER=0 framespacing=0 frameborder=0 scrolling=no noresize>
<frame name="topFrame" src="/ExamCabinet/Exam1.html" >
<frame name="bottomFrame" src="/ExamCabinet/Exam2.php3" >
</frameset>

</html>

Vladdy
05-11-2003, 02:04 PM
The answer to ALL frame problems is simple: DO NOT USE THEM.

The "frame" appearance can be easily achieved with CSS. Just use overflow: auto with your content block. Here are my examples:
www.klproductions.com/home.html (use the style selector in the bottom right corner to overflow the content element(set to large))
http://server.ime.uri.edu/EMRL (hover over the buttons to get a block with overflown content)

amdRocks
05-11-2003, 02:30 PM
Originally posted by Vladdy
..............
The "frame" appearance can be easily achieved with CSS. Just use overflow: auto with your content block.

Can you load another page using CSS block?

Vladdy
05-11-2003, 02:43 PM
Why do you need to load another page? Separating content from navigation and banner makes it accessibility nightmare and has plenty of other negative consequences.

vincentms
05-11-2003, 04:16 PM
Hello All,

Vladdy:
I am not able to make something from your example.

Perhaps, there is a more simple example. I am such a beginner.

Thanks,
Vincent

Vladdy
05-11-2003, 04:39 PM
<div style="width: 100px; height 50px; overflow:auto">
you content stuff goes here. put allot of it to get the scroll
</div>

khaki
05-11-2003, 05:52 PM
Hi Vincent....

Check-out the following page for an Excel-like frozen AND fluid page:

http://www.thenoodleincident.com/tutorials/css/index.html

Frames will be ancient history once you adopt this style (in whatever variation).

Good luck and have fun learning!!! :)

;) k

vincentms
05-12-2003, 01:22 AM
I am trying to get this to work, but I must be thick...I'm sure!

All I want to do is freeze the header so it doesn't scroll. I have not been able to do this. Is there some simple change in my "style " that will accomplish this. BTW, I use IE 6.

Thanks in advance,
Vincent

P.S., Thanks so far to Vladdy and Jersey girl



<html>
<head>
<style>
#header {
position: fixed;
margin: 10px 0px 0px 0px;
top: auto;
left: auto;
border: none;
height: auto;
z-index: 5;
overflow:none; }
#main{
margin-left: 0em;
margin-top: 80px;
overflow:none; }
</style>
</head>
<body>
<div id="header" >Best little title in Texas</div>
<div id="main" >My content and all the stuff that belongs to it.</div>
</body>
</html>

Vladdy
05-12-2003, 05:30 AM
position:fixed is not supported by IE, but you do not need it. Do this:

<html>
<head>
<style>
body
{ padding: 0px;
margin: 0px;
}

#header
{ position: absolute;
margin: 0px;
top: 0px;
left: 0px;
border: none;
height: 10%;
width: 100%;
overflow: none;
text-align: center;
line-height: 200%;
}

#main
{ position: absolute;
margin: 0px;
left: 0px;
top: 10%;
width: 100%;
height: 90%;
overflow: scroll;
}
</style>
</head>
<body>
<div id="header" >Best little title in Texas</div>
<div id="main" >My content and all the stuff that belongs to it.</div>
</body>
</html>

vincentms
05-12-2003, 05:57 AM
Thanks Vladdy,

You are a life saver, a real Peach!

I am very delighted with this simple and beautiful example, I will begin dissecting it today and putting it to good use post haste.

Sincere thanks,
Vincent
Zürich Switzerland