SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard Busch's Avatar
    Join Date
    Jan 2004
    Posts
    1,072
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    window.open sizing problem

    I am having a problem having my pop-up window size the the exact proportions. I want the window to fit to an image's size but it displays about 10-20px of white space on the right and bottom of the image. I have adjusted the margins and padding to 0 via css. Here is my code. do you see any problems?

    here is the link:


    Code:
    <a href="#" onClick="window.open('http://www.ericbusch.net/ab_display_image.php?name=lantern',
    'lantern', 
    'height=310px, width=410px'); return false;">
    <img src="http://www.ericbusch.net/images/thumbs/lantern.jpg" /></a>
    here is the page that displays the image:
    Code:
    <style type="text/css">
    <!--
    body
    {
    	margin: 0px 0px 0px 0px;
    	padding: 0px 0px 0px 0px;
    }
    img
    {
    	padding: 0px;
    	border-width: 0px;
    	margin: 0px;
    }
    
    -->
    </style>
    </head>
    <body>
    <img src="/images/temple.jpg" width="310px" height="410px"/>
    Any ideas?
    Busch
    Last edited by Busch; Mar 7, 2004 at 07:13.

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This problem has been approached before, and solved.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •