html - Putting next and previous arrow on either side of an image -
i have image in div has size of 300px , want next , previous arrow on either side of the image. 1 added issue if screen 300px want arrows on top of image. how can done?
my div code below:
<!--this div container carousel --> <div id='myswipe' style='max-width:300px; margin:0 auto' class='swipe'> <!--the images in div --> <div class='swipe-wrap'id="featured"> </div> </div>
.container { position: relative; } .container .arrow { position: absolute; top: 150px; } .container .arrow.left { left: 0; } .container .arrow.right { right: 0; }
by setting relative positioning parent (default static
) , absolute positioning children, absolute relative parent.
Comments
Post a Comment