Frame height problem
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,
pr0gr4mm3r posted this at 10:59 — 15th April 2009.
He has: 1,502 posts
Joined: Sep 2006
See why frames are bad?
So what you are saying is that you have to give the frame a fixed height, but the length of the content changes as the questions change, correct? The only way I can see around this is if you would make the frame as high as the longest question you could see writing, and let there be a little bit of empty space when there is a shorter question up there.
...and that's assuming that you have to use a frame. The best thing to do would be to use some AJAX.
decibel.places posted this at 12:42 — 15th April 2009.
He has: 1,494 posts
Joined: Jun 2008
a link or some code always helps zero in on the solution...
have you tried using the wildcard * for height? or a percentage?
I worked on an ecard app with a quote bubble that adjusted height depending on the content (character count + new line count)
I'm not sure, but can the frame height be adjusted dynamically with JavaScript/DHTML?
sounds like a scrollable div (no scrollbar) could work, have a look.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.