| free hosting image hosting hosting reseller online album e-shop famous people | ||
![]() ![]() |
||
And this is the result:
But their positions can now be controlled with the following position parameters:![]()
![]()
![]()
The last parameter is a little confusing, but the position is based on the left-hand edge of the image.position - can be absolute or relative
top - the number of pixels from the top of its relative or absolute position
left - the number of pixels to the right of its absolute or relative position
position:absoluteTo place the image relative to its actual position on the page:
position:relative
position:relative; top:0; left:150pxAnd this is the result:
And this in the body of your page:
relative positioning to stagger and move the images
z-index layering to overlap them, and bring the desired image to the top layer.
which - the index of the image to be manipulated
idx - the desired z-index layer
pos - the position of the image
pic[0].style.zIndex = 4where:
pic[0].style.left = 190
Therefore Image 1:pic[0] is Image 1
4 is the image's z-index value
190 is the number of pixels from the left of its actual place on the page.
moves 90 pixels to the right of its previous position (190 - the initial 100)
becomes the top layer
Bring Image 1 To Top
Bring Image 2 To Top
Send Image 3 To Back