Welcome, Guest. Please login or register.

Login with username, password and session length
Pages: [1]   Go Down
Print
Topic: Frame height problem  (Read 477 times)
« on: April 20, 2009, 03:39:48 AM »
nishu12 Offline
Newbie

View Profile
*
Posts: 3



Hey all,

I've got a frame on my site, which is a simple box, made for a poll. Once the user has voted, it loads a new page with the results in the frame. A lot of people told me I shouldn't use frames because they're bad, but atm I don't care, it's good like that, and I want to use it !

The only problem is the height. I can set the height so it's not too small or too big, but the problem is that the height is not relative. That means if I remove "height: xxxpx;" from the CSS stylesheet, it automatically sets the frame at 50 px or so but that's too small, so the scrollbars appear and you have to scroll in the frame. And that's weird. Any idea how I could change that ? Do you see what I mean ? Cause I will change the question of the poll quite often and then I would have to change the height in the stylesheet everytime, that's crap


Thanks in advance,
Logged

 
« Reply #1 on: April 21, 2009, 03:47:58 PM »
Atrain Offline
Alex [Atrain] Waite
Global Moderator
Sr. Member

View Profile WWW
*****
Gender: Male
Posts: 460



your gonna have to change the height everytime if you want it to work.
Logged

When I die, I want to be buried face down, so that everyone who doesn't like me can kiss my a**
-Red Foreman
http://www.newatrain.com
http://www.unlimiteduploading.com
« Reply #2 on: April 22, 2009, 02:09:22 AM »
neluni Offline
Newbie

View Profile
*
Posts: 3



That limitation is one reason why frames (and iframes) are bad and you should never use them

There are others, as well...

However, if you're set on this, there are JavaScript-based ways of checking how big the content of an iFrame is, and then resizing it to fit. Google is the best place to go, but here's a starter for ten:
http://www.devpapers.com/article/200.
Logged
 
Pages: [1]   Go Up
Print
Jump to: