home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

sizing an inline frame

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1803
Discussions: 200,950, Posts: 2,379,448, Members: 246,312
Old March 28th, 2007, 12:01 AM   Digg it!   #1 (permalink)
Mobile Member
 
ShuckyD's Avatar
 
Join Date: Apr 2005
Location: S. Central PA
Posts: 3,601
sizing an inline frame

Hey all, ive been on and off of here with random questions about inline frame and .asp etc for a site im obligated to do.. So now i have got the files on this computer (from my work one) and im having a problem with the way things are rendering and navigating in the inline frames. Its like the width isnt the problem of them, but the height is.. You'll see the snippet of code that is giving me all the problems below:

Code:
<iframe src="includes/main.html" width="100%" id="main" name="main" frameborder="2" height="800" ></iframe>
that is where the main windows is loaded (bottom-mid right) If i dont have a height parameter its very small, i can add parameters then for scrollbars, but if i give it a "height='100%'" then the page just doesnt load, but if i give it a fixed pixel it works, but it leaves soo much blank space below, and then you have to keep in consideration different page lengths and different resolutions Any help would be great with that.

Also if you open the files attached and see the "Club Info" page, when you click the link to open the PDF, i want it to make the browser ask you if you want to open or save the file, not open right up in that iframe, especially if someone doesnt have Adobe Reader, which i will put a link to on there and a warning as well

Any other suggestions on how i should go about doing this site are also welcome, as you will be able to see from the files i have a basic structure and just have to add content.. (alot)

Thanks
__________________
Thinkpad T61 14.1" wide | WinXP Pro | C2D T8300 CPU | 3GB DDR2 | 160GB HDD | AGN & WWAN
Lenovo S10 10.2" LED display | 1.6Ghz Atom CPU | 1GB DDR2 | 1.3mp webcam | B/G WiFi | 160GB HDD

Last edited by ShuckyD : March 28th, 2007 at 12:05 AM.
ShuckyD is offline   Reply With Quote
Old March 28th, 2007, 12:43 AM     #2 (permalink)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,558
Blog Entries: 7
To my knowledge, and I may not be correct in this, you can not dynamically size an iframe. It's either no height, or a set height. Height is typically not a percentagable setting, since a page's height can be infinite.

There's no way to have the scrollbar hidden except on demand either, IIRC. It's a very limited impliment, though very handy for static layouts.

There may be a way to embed a page within a div tag, but I'm not sure, I've never tried to do it. That way you could use the overflow property to at least hide the scrollbar when it's not needed.

One way that will work is to put the iframe in a div that has the overflow: auto property. You will still have to give the iframe a set height, but if you set the scrolling to no, the scrollbar _should_ only show up when there's too much text to show. You have to set the width property of the iframe properly though, or you'll always have a horizontal scrollbar.
Whir is offline   Reply With Quote
Old March 28th, 2007, 07:28 AM     #3 (permalink)
Mobile Member
 
ShuckyD's Avatar
 
Join Date: Apr 2005
Location: S. Central PA
Posts: 3,601
is there any better way to do this without iframes that you can think of? Because they still seem to render differently between FF and IE
ShuckyD is offline   Reply With Quote
Old March 28th, 2007, 07:47 AM     #4 (permalink)
Member
 
Join Date: Nov 2005
Location: Northern Ireland
Posts: 210
Never used iframes, but I have used layers to produce similar effect, if I'm reading correctly. Layers scale dynamically with the viewers resolution, and I'm sure they allow a height percentage to be set as well fixed values.

Never tried to embed a page for it, it was purely for retrieving data from a datebase, and so had to be pretty flexible, especially height wise.

Been a long time since I did it, I'd need to dig out my programs and make a dummy one when I got home to check, but almost sure this will produce the desired look.
__________________
E6400 @ 3Gig | 4Gig Corsair PC6400 @ 800 | P5N-E SLI 650i | HD4850 | 2 x 250 WD2500JS RAID 0 | Samsung 940BW
Achay is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
inline frame navigations.... ShuckyD Webmastering and Programming 0 February 20th, 2007 11:41 PM
CAT6 Inline Coupler plowman Networking and Internet 4 October 7th, 2006 01:23 PM
inline autocomplete not working kendy Technical Support 17 June 28th, 2004 01:47 AM
Inline frames on Linux browsers Dbest Graphic Design and Digital Photography 4 December 11th, 2002 10:49 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
The disrespect of Obama by Russian .. (35)
Making Health Care Worse (177)
Wireless Televisions. (12)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Regular Build (7)
radeon x850xt platinum & shader.. (6)
Is the PSU I received dead? (12)
Print spooler problem (15)
windows vista security holes (10)
HIS HD5770 graphic card question (15)
Install XP pro and a Vista laptop ?.. (11)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Foreign voltage (10)
Recent Discussions
windows vista security holes (10)
EVGA 9800 gtx help with finding a goo.. (9)
Internet Lost (2)
Point and Shoot Camera Suggestions. (4)
Regular Build (7)
Multiple Restarts Required at Boot (2)
Ideal cheap graph card for PC-Gaming? (18)
radeon x850xt platinum & shader 3 (6)
Graphics Card Upgrade Question (4)
For Sale BFG GTX285 OC2 with 10 year .. (3)
How to convert MP3's (4)
Wireless Televisions. (12)
Laptop with wireless problem. (2)
Hp Artist Edition + Matching Bag (0)
My monitor won't turn on after instal.. (0)
Asus P4G8X Mobo (6)
Xbox 360 GTA: SA disk error (1)
Is the PSU I received dead? (12)
windows 7 internet problem (5)
BSOD On Startup (ntoskrnl.exe) (2)
Print spooler problem (15)
Have you switched yet? (86)
screen resolution vs monitor size (2)
sms storage to PC (0)
Open With ..... Win7 (0)


All times are GMT -4. The time now is 12:30 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28