HighDots Forums  

Re: space between top of browser or frame and document body

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: space between top of browser or frame and document body in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: space between top of browser or frame and document body - 09-12-2008 , 01:54 PM






removeps-groups (AT) yahoo (DOT) com wrote:
Quote:
Is there any way to control the space between top of browser or frame
and document body?

What I have is this: There is a simple file test1.html, and file
test.html that displays test1.html in an iframe. On the iframe I set
marginheight and marginwidth to zero. But there is one line of blank
space between the top border of the iframe and the first line of
text. However, the iframe's content document's body's offsetHeight
gives the height without considering this extra space between the top
margin of the iframe and the body. As a result, when I set the
iframe's height to the offsetHeight through Javascript, it is not big
enough but one line. This is on Mozilla 2.0.
body { margin: 0; padding: 0; }

?


Reply With Quote
  #2  
Old   
removeps-groups@yahoo.com
 
Posts: n/a

Default Re: space between top of browser or frame and document body - 09-12-2008 , 06:41 PM






On Sep 12, 10:54 am, Harlan Messinger
<hmessinger.removet... (AT) comcast (DOT) net> wrote:

Quote:
body { margin: 0; padding: 0; }
Did not work. In my file test1.html I tried both

<body style="margin: 0; padding: 0;">

and

<style type="text/css">
body { margin: 0; padding: 0; }
</style>



Reply With Quote
  #3  
Old   
Ben C
 
Posts: n/a

Default Re: space between top of browser or frame and document body - 09-13-2008 , 05:38 AM



On 2008-09-12, removeps-groups (AT) yahoo (DOT) com <removeps-groups (AT) yahoo (DOT) com> wrote:
Quote:
On Sep 12, 10:54 am, Harlan Messinger
hmessinger.removet... (AT) comcast (DOT) net> wrote:

body { margin: 0; padding: 0; }

Did not work. In my file test1.html I tried both

body style="margin: 0; padding: 0;"

and

style type="text/css"
body { margin: 0; padding: 0; }
/style
I supposed you could try

html, body { margin: 0; padding: 0 }


Reply With Quote
  #4  
Old   
removeps-groups@yahoo.com
 
Posts: n/a

Default Re: space between top of browser or frame and document body - 09-15-2008 , 05:46 PM



On Sep 13, 2:38 am, Ben C <spams... (AT) spam (DOT) eggs> wrote:

Quote:
I supposed you could try

html, body { margin: 0; padding: 0 }
Still didn't work. Maybe the workaround is to add 64 to the offset
height, for example:

var height = frameContentBody.offsetHeight + 64;
frame.height = height;



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.