English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Is there a way to set an Object element that embeds HTML to automatically size so that all the data in the embeded web page is visible without the frame for the embeded page clipping the text or having any left over space where there is no text? If I don't specify a width and a height, it defaults to size 0x0 in IE, but if I do set a size, I have to try to figure out how that is going to look on the target computer, what size resolution, if the window is maximized, etc.

2006-08-24 02:15:41 · 3 answers · asked by Sifu Shaun 3 in Computers & Internet Programming & Design

3 answers

if you are tying to set the size of element to be a certian size pending on the screen size then use javascript and offset

EX:
x=document.body.offsetWidth;
y=document.body.offsetHeight;

then you will have the size of the window and you can do you math and adjust the elements. putting a call to your funtion on a resize will maintain your page

EX:

2006-08-24 02:26:40 · answer #1 · answered by Nick H 3 · 0 0

Am assuming you're embedding flash...if that's the case, take a look at Geoff Stearns' flash object. Here's an example of a 100%width, 100% height embed:

http://blog.deconcept.com/swfobject/fullpage.html

2006-08-24 13:02:45 · answer #2 · answered by achtungbaby 3 · 0 0

simply use percentage instead of pixels. exchange px with pct, and use your calculator to find the size your need.

2006-08-24 09:33:33 · answer #3 · answered by Tro K 2 · 0 0

fedest.com, questions and answers