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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top margin and Left Margin

Status
Not open for further replies.

Ragol1

Programmer
Oct 25, 2001
315
US
I use this code to display a picture but I want to add top Margin=0 and left Margin =0 how can I do this?

Or have it display a BG color of #333333

Thanks

Nick
<SCRIPT>
function popUp1(URL1) {
New1 = open (URL1 , &quot;New1&quot;, &quot;toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=295,height=230,Top Margin=0,screenX=200,screenY=200,left=200,top=200&quot;);
}
</SCRIPT
 
You could do this:

<SCRIPT>
function popUp1(URL1) {
New1 = open (&quot;about:blank&quot;, &quot;New1&quot;, &quot;toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=295,height=230,Top Margin=0,screenX=200,screenY=200,left=200,top=200&quot;);
New1.document.write(&quot;<html><body bgcolor=#333333 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><img src=\&quot;&quot;+URL1+&quot;\&quot;></body></html>&quot;);
}
</SCRIPT> Adam
 
Works great thanks...

Is there a way to add a title for the picture
 
With the document.write function, you could send a fully fledged HTML page to the window. Thus, changing the string to something like:

&quot;<html><head><title>Whatever</title></head><body...&quot;

should do the trick. Cheers,
Nico
 
Is there a way for this picture to always stay on top?

When it is open there are 10 pictures under it. if a user moves to another picture it goes to the bottom.

Thanks
Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top