How Do I Remove IE's Automatic Border?

  • Thread starter Thread starter gyrm
  • Start date Start date
G

gyrm

I've written a program (actually a COM object) that takes screenshots
in IE. When the natural scroll size of the page exceeds the size of of
the viewport (client height and width), I pan around the page, capture
the contents, and piece the image together.

This works perfectly when the browser is in quirks mode; however when
in standards mode, I get this funky border that I cannot for the life
of me figure out how to remove. I've tried everything I can think of,
including the following CSS:

* {
border: none
}

to no avail. What IS this border, and how the heck do I get rid of it?
I would TOTALLY appreciate some insight on this, as I've wasted a lot
of time trying things randomly and searching for the answer online
(sigh). See the following image as an example:

http://snapsie.sourceforge.net/images/foobar1.png

rendered from

http://snapsie.svn.sourceforge.net/viewvc/snapsie/trunk/test2.html?revision=8&view=markup


Haw-Bin
 
margin?

I tried setting both margin and padding to 0 for html and body, still
with the same result.


Haw-BIn
 
Ok, so I solved this automatic border business between revisions 8 and
11: http://snapsie.svn.sourceforge.net/viewvc/snapsie/trunk/

Basically, the values of clientLeft and clientTop give you the
dimensions of the border on whichever element is considered the HTML
canvas; for quirks mode, it's the body element; for standards mode,
it's the document (html) element. It appears that when in standards
mode, the canvas border cannot be manipulated with CSS.

Haw-Bin
 
Ok, so I solved this automatic border business between revisions 8 and
11: http://snapsie.svn.sourceforge.net/viewvc/snapsie/trunk/

Basically, the values of clientLeft and clientTop give you the
dimensions of the border on whichever element is considered the HTML
canvas; for quirks mode, it's the body element; for standards mode,
it's the document (html) element. It appears that when in standards
mode, the canvas border cannot be manipulated with CSS.

Haw-Bin
 
Back
Top