Switch to full style
HTML code examples
Post a reply

negative margins with images

Fri Feb 17, 2012 4:52 pm

Following is an example of using negative margins with images.
Code:


<html>
<
head>
<
title>negative margins with images</title>
<
style type="text/css">
{
   
positionabsolute;
   
top50%;
   
left50%;
}
img {
  
  
margin-top: -100px;
  
margin-left: -100px;
}
</
style>
</
head>

<
body>
  <
p>
  
    
Example of using negative margins with images
   
  
<img src="site_logo.gif" width="100" height="100" alt="Logo">
  </
p>
</
body>
</
html>

 




Post a reply
  Related Posts  to : negative margins with images
 Sequence of Images , draw several images in a row     -  
 aligning the scanned images     -  
 User rank images     -  
 bmiles v1.0 - images are not showing     -  
 Displaying Images using servlets     -  
 Display images on jsp from servlet     -  
 Displaying Images in a Gallery     -  
 PHP forum- images displaying as codes     -  
 Exporting Images in Excel in Android     -  
 Displaying images from database instead of the url from data     -  

Topic Tags

HTML Image