View Full Version : functionality of frames but only one file - how?
kattie
07-21-2005, 03:29 PM
hey guys,
iva a funny question. is it possible to get the functionality of frames (sliding top and side) but have all the html in the same file. i work in a content management system where i insert html into a placeholder so i dont want to have to do this multiple times. haveing frame functionality in on html file would save me a lot of work. anyone ever heard of this ??
thanks guys (: ,)
Donkey
07-21-2005, 03:52 PM
If you use css positioning {position:fixed;} will stick an element on the viewscreen so that everything scrolls by but it won't work in IE.
There is a way to make it work in IE but you loose some functionality.
you can simulate fixed positioning by moving the scroll bars on to the document body using;
html
{
overflow: hidden;
}
body
{
height: 100%;
overflow: auto;
}
This fools IE into interpreting position absolute as fixed, it won't work with position:fixed; Also I believe it can be a bit iffy when the page gets complicated with scroll bars being covered by other content.
I found this information here Faking Position Fixed in IE (http://devnull.tagsoup.com/fixed/)
jalarie
07-21-2005, 08:11 PM
If Javascript is available, you can have one file which does the frameset and opens empty frames, then "onload" use a Javascript function on that same one page to populate the individual frames. I don't see this as usually practicle, but I did it once just for proof-of-concept.
Tristan Gray
07-21-2005, 08:32 PM
Both good suggestions but in my opinion messy. I'd rethink the design as so far as I am aware there is no practical way of doing this. Probably about 80% of your browsers will be using IE and things will almost certainly be buggy if you use the IE hack. Not to mention that when IE7 comes out it will very likely no longer interpret that code the same way thus breaking your entire page. IE7 isn't that far off I don't believe so that is something to consider.
As for java, 20% of users have it disabled and most of those are the office types because of their network admin. Frames break a lot as well.
Either way you slice it, a considerable portion of your viewers will have trouble with either of these solutions and I think they may also get in the way of other things you may want to do on your site.
kattie
07-25-2005, 12:58 PM
Both good suggestions but in my opinion messy. I'd rethink the design as so far as I am aware there is no practical way of doing this. Probably about 80% of your browsers will be using IE and things will almost certainly be buggy if you use the IE hack. Not to mention that when IE7 comes out it will very likely no longer interpret that code the same way thus breaking your entire page. IE7 isn't that far off I don't believe so that is something to consider.
hey guys. thanks a lot for you feedback. you right of course. ill the web moves so fast that a hack might land me in trouble down the line. thanks guys for both you inventiveness and sobering words. (: ,) onward.. k!
Donkey
07-25-2005, 03:08 PM
Probably about 80% of your browsers will be using IE and things will almost certainly be buggy if you use the IE hack.
It's not an IE hack, it works in all browsers, it just moves the scrolling from the html to the body element, making anything positioned absolutely behave as though it was fixed. I would have thought that IE7 will still recognise standard (X)html layout structure. i.e.
<html>
<head>
</head>
<body>
</body
</html>
The one problem is you can't use position:absolute; but most layouts tend to use relative positioning and floats anyway.
Tristan Gray
07-25-2005, 03:42 PM
This is a hack to emulate the CSS 2 positioning scheme position:fixed for Windows Internet Explorer
Taken from the tag soup article it was written in.
You may call this a workaround but I call it a bad idea.
mojitomaker
07-26-2005, 02:58 AM
scrollable div with overflow=auto?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.