Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

that grey area in top&left new window, huh??

Status
Not open for further replies.

gbnunn

Programmer
Jun 15, 2000
2
US
Hi, beginning JavaScript here.&nbsp;&nbsp;I'm trying to program display images in new windows as user clicks on image map.&nbsp;&nbsp;No problem getting it to work, but how does one get rid of that grey area in top&left of new window?&nbsp;&nbsp;I want the jpeg image real snug in a new window without the awful looking 10-12 pixels of grey interior to left and top.<br><br>Fussy I know, would appreciate help though.&nbsp;&nbsp;I set the new window size via innerHeight and innerWidth exact to dimensions and it still has that grey border inside.<br><br>Thanks, Gary<br>
 
Either you image has that margin and you need to edit your image...<br><br>...or...<br><br>You need to establish margins of zero within your new window.
 
rkmarcks, thanks for advice, but the image has no border grey, transparent or otherwise.&nbsp;&nbsp;So how would I set inside margins of zero for a new window during the creation of the window?&nbsp;&nbsp;I have not figured a means to do that.&nbsp;&nbsp;I want a completely stripped down minimum chrome new window with just the image inside when you click on an image-mapped thumbnail.<br><br>Thanks, Gary<br>
 
Dear Gary,<br><br>I can not create the behavior you describe. Do you have an URL to look at that provides an example?<br><br>-pete
 
This is actually HTML and not JavaScript.&nbsp;&nbsp;Try the following:<br><br>&lt;img border=&quot;0&quot; src=&quot;myimage.gif&quot; width=&quot;213&quot; height=&quot;204&quot; style=&quot;left: 0; top: 0; width: 213; height: 204; position: absolute; float: left;&quot;&gt;<br><br>Within the style parameter are left and top values for margins.&nbsp;&nbsp;Also note you can specify the height and width of the image and these values will override the height and width parameters of the image tag.&nbsp;&nbsp;The position tag can be absolute or relative, but you will need absolute in your case.<br><br>If this doesn't work, I suggest you provide code or a URL as palbano suggests, else we're just guessing.<br><br>Russ
 
P.S.&nbsp;&nbsp;The style tag with the parameters I gave you are supported in IE.&nbsp;&nbsp;I'm not sure if all of the parameters for the style tag, or even any of them for that matter, are supported in Netscape.<br><br>Russ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top