Removing window padding/margin within IE.

D

Daz

Hi everyone. I have just been making a JavaScript chat applet, which
should open in a new child window. It does all of this fine, and works
within Firefox beatifully. However, IE thinks it's necessary to stop my
iFrames from spaning the entire length and width of the Window, and add
about 7-8mm of padding/margin to the inside of the Window.

I can't figure out, whether it's adding it to the inside of the window,
or the outside of the frame.

Please could someone point out how I might be able to go about removing
this padding? It's rediculous. I don't mind the border one bit, but no
matter what I do, it's chopping off 14-16mm of the bottom iFrame. The
window needs to be resizable, so unfortunately, the bottom iFrame is a
set pixel hight, but the top iFrame works with a percentage (i.e 100%
of the frameset surrounding it).

Many thanks.

Daz.
 
P

phpdevkit

Have your tried the iframe's width attribute? Maybe it works the same
in both browsers.

<iframe src ="/default.php" width="100%"></iframe>

And CSS may be helpful, althought I have not tried it
specifically...put this between <style> tags...

iframe.myiframe
{
padding: 0 ;
margin: 0 ;
}

Maybe this too?

body
{
padding: 0 ;
margin: 0 ;
}

Put this in the body...

<iframe class=myiframe src ="/default.php" width="100%"></iframe>

Let me know if you get things working.
 
D

Daz

phpdevkit said:
Have your tried the iframe's width attribute? Maybe it works the same
in both browsers.

<iframe src ="/default.php" width="100%"></iframe>

And CSS may be helpful, althought I have not tried it
specifically...put this between <style> tags...

iframe.myiframe
{
padding: 0 ;
margin: 0 ;
}

Maybe this too?

body
{
padding: 0 ;
margin: 0 ;
}

Put this in the body...

<iframe class=myiframe src ="/default.php" width="100%"></iframe>

Let me know if you get things working.

Unfortunately, none of it works. I have already set the width of the
iFrames to 100% through the inline style.

The code is written to the child window using document.write() from the
parent window. All the the code seems to evaluate and parse correctly,
although I can't seem to get anything into the child window between
script elements using this method, although it's not a serious issue.

Even Firefox shows a border around the inside of the window frame, but
the content displays fine. I still can't figure out whether it's a
margin on the inside of the window frame, or padding on the outside of
the iFrame.

I think I am going to change the height of the top frame to 95% or
something similar to see if that makes any difference.

Thanks for your help. I really appreciate it.

Why, Microsoft? Whyyyyyyyyyyyyyyyyyyyy! Hehe.

Daz.
 
D

Daz

Daz said:
Unfortunately, none of it works. I have already set the width of the
iFrames to 100% through the inline style.

The code is written to the child window using document.write() from the
parent window. All the the code seems to evaluate and parse correctly,
although I can't seem to get anything into the child window between
script elements using this method, although it's not a serious issue.

Even Firefox shows a border around the inside of the window frame, but
the content displays fine. I still can't figure out whether it's a
margin on the inside of the window frame, or padding on the outside of
the iFrame.

I think I am going to change the height of the top frame to 95% or
something similar to see if that makes any difference.

Thanks for your help. I really appreciate it.

Why, Microsoft? Whyyyyyyyyyyyyyyyyyyyy! Hehe.

Daz.

Ok, I have worked out a temporary fix, and used a table. IE seems to
display this correctly. It's not my ideal fix, but it seems to work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top