Relative position image : position « Layout « HTML / CSS

HTML / CSS » Layout » position 
Relative position image
 
<html>
<head>
<title>Relative position image</title>
<style type="text/css">
.relative {
 position: relative; 
 top: 100px; 
 left: 20px;
}
</style>
</head>

<body>

   <img src="http://www.java2s.com/style/logo.png" class="relative" alt="cover" />
     <p>This is a test.</p>
  
</body>
</html>

 
Related examples in the same category
1.The position Property
2.CSS provides six positioning models for positioning an element: static, absolute, fixed, relative, float, and relative float.
3.position descendant
4.Normal Flow
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.