PDA

View Full Version : Frames question


pavid
12-20-2009, 06:55 PM
Hi there,

i have a quick question about the use of frames on a page.

ive got an idea which envolves splitting the whole page in half so there are two vertical columns which are 100% wide (or 50%?) so they are both exactly half of the screen no matter how big the screen is.

on top of this, i would like the frame on the right to have the scroll bar on the right like normal and on the left frame the scroll bar on the left.

does anyone think this is atall possible before i spend all my time on it.

any thoughts would be appreciated!

regards

dave

gentleone
12-20-2009, 07:58 PM
Yes, it is possible with the jQuery plugin jScrollPane

Example with scrollbar on the left:
http://www.kelvinluck.com/assets/jquery/jScrollPane/examples.html

Main page with all the jScrollPane examples:
http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html

You can even set the scrollbar to a certain style (color or images) that is cross-browser.

pavid
12-20-2009, 11:01 PM
thanks!

that should work for the scroll bar.

but do you think there is a way to do these 50% width frames?

cheers

d a v e
12-21-2009, 05:55 AM
why do you want to do this? what special function do you need this for?

pavid
12-21-2009, 08:51 AM
its just a page design i have come up for my site.

just want to have two pages on one page.

d a v e
12-21-2009, 09:15 AM
it's just that frames are awful - for seo, usability, bookmarking... everything :)

how about a div floated next to another with the overflow set to auto and then you will get scrolling in both divs.

normally of course you would have one page per page like almost every other website out there, which is why i was wondering why you needed this sort of layout ;)

pavid
12-21-2009, 05:44 PM
Yeah, well I've never used them before, but as they are not used much, I assumed they wernt great.

The 2 div things sounds promising. I had a little try, and I got two divs next to each other using 50%. But are you able to make a div 100% height so it fills the height of the page. When ever I have made a div 100% height it just re sizes to the content inside. I had a read about scroll bars inside a div, and you can do something like overflow auto or something? But when I tried, the page scrolled rather than the div. Maybe I need to used some sort of positioning?

I hope I can do this.

Thanks for your help so far.

Appreciate it.

Dave