PDA

Click to See Complete Forum and Search --> : Pop-up windows


Dr.Rock
Feb 1st, 2002, 04:10 PM
I want to create a photo-link on a web page, so I click on it and a pop-up window comes up with a photo in it.

I know how to open a pop-up window using the window.open() command, where we set the wondow properties, dimensions, URL of photo displayed in pop-up, etc. However, the window always has a margin on the top and left, so we get an unwanted border around the photo. I want to eliminate the margins, so we get only the photo in the pop-up, no spaces. It should work on both MS Explorer and Netscape.

Thanks.

ubunreal69
Feb 1st, 2002, 11:48 PM
cant that be changed by the source code of the html file used to view the photos ? i might be able to help if i could understand exactly what u mean.

Wynd
Feb 2nd, 2002, 12:03 AM
Instead of opening a window with an image in it, try opening a window containing an HTML page with the borders set to 0 (using CSS) and an image in it, and the window the same size as the picture.

Dr.Rock
Feb 2nd, 2002, 05:10 AM
Thanks Wynd. I already thought of that, using a parent HTML file inside the popup window, the the photo inside that parent HTML file. However, won't the topmargin=0 and leftmargin=0 commands only work under Internet Explorer, and not Netscape? I've seen this sort of thing work under Netscape too on some sites, but never had the interest back then to see how it was done.

scoutt
Feb 2nd, 2002, 10:33 AM
Dr. Rock you are right about one thing, those are for IE, but Netscape is this.


marginheight="0" marginwidth="0"

also the code to have the window not have borders is

http://www.snippetlibrary.com/viewhtml.php?siteid=38