SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Possible to Float an image over another image?

    Hi
    I want to put picture2.gif over picture1.gif
    How is this possible to do without background image?

    This is the code I have made
    <img src="picture2.gif" class="funk"><img src="picture1.gif" class="floating" alt="" />

    img.funk { float: right;}
    img.floating {
    float: right;
    position: absolute;
    }

  2. #2
    SitePoint Member
    Join Date
    Jun 2006
    Location
    UK
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think its perfectly possible e.g
    Code:
     #a1 {
    	background-color: #999999;
    	float: left;
    	height: 100px;
    	width: 100px;
    }
    #a2 {
    	background-color: #009900;
    	float: left;
    	height: 40px;
    	width: 40px;
    	position: relative;
    	left: 40px;
    	top: 40px;
    }

    HTML Code:
    <div id="a2">a</div><div id="a1">a</div>
    Thats what I knocked up with divs, you will need to try it with your images


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •