HTML Help Forum HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

Putting images to the top left corner with no buffer
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum -> Images & Graphics
View previous topic :: View next topic  
Author Message
LuiePL



Joined: 10 Sep 2006
Posts: 4

Posted: Sun Sep 10, 2006 3:05 pm     Putting images to the top left corner with no buffer  

I'm looking to create a "pop-up" which will display the image the user clicked on. I want it to put the image at the very top left hand corner so there's no space around it. I haven't been able to find anything on this.
Skorpija



Joined: 14 Apr 2006
Posts: 10

Posted: Tue Sep 12, 2006 6:46 am      

Code: <div id='image1' style="position:absolute;visibility:hidden;"><img src="your_image_to_display.jpg"></div>

then write a javascript function which sets the div to visible.

[/code]
dinvinci



Joined: 02 Oct 2006
Posts: 9

Posted: Tue Oct 03, 2006 6:54 am      

If I'm understanding your question correctly, the div suggestion above doesn't directly answer your question. If you are using javascript/php to open a new html page containing your image, then you would set the body attributes of that new page to have margin/padding of 0. This is done either through Page properties in an html editor such as dreamweaver, or typed directly into the body tag of the page like this:

Code: <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

It can also be done with css code inserted into the head area of your page:

Code:
<style type="text/css">
<!--
body {
  margin: 0px;
  padding: 0px
}
-->
</style>


Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Tue Oct 03, 2006 7:39 am      

The style is the best way to go that dinvinci used. Using absolute positioning can get you into trouble at times.

_________________
Corey
Toll Fax Numbers | Merchant Accounts
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum -> Images & Graphics
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group