Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / December 2006



Tip: Looking for answers? Try searching our database.

Removing window padding/margin within IE.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daz - 31 Dec 2006 18:26 GMT
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.
phpdevkit - 31 Dec 2006 19:33 GMT
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.

> 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
[quoted text clipped - 15 lines]
>
> Daz.
Daz - 31 Dec 2006 19:49 GMT
> Have your tried the iframe's width attribute?  Maybe it works the same
> in both browsers.
[quoted text clipped - 43 lines]
> >
> > Daz.

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.
Daz - 31 Dec 2006 20:55 GMT
> > Have your tried the iframe's width attribute?  Maybe it works the same
> > in both browsers.
[quoted text clipped - 65 lines]
>
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.