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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -