make slider images fully responsive - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

make slider images fully responsive

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
#sliderFrame {<!--  w w  w .j  a  v  a2 s.  c o  m-->
   width:100%;
   height:100px;
   position:relative;
}

#sliderFrame #slider {
   width:100%;
   height:100%;
   position:relative;
   background:Chartreuse url('https://www.java2s.com/style/demo/Google-Chrome.png') no-repeat 51% 51%;
   box-shadow:0px 2px 6px yellow;
}

#sliderFrame #slider img {
   width:100%;
   position:absolute;
   top:0;
   left:0;
}
</style> 
 </head> 
 <body> 
  <div id="sliderFrame"> 
   <div id="slider"> 
    <img src="https://www.java2s.com/style/demo/Safari.png" alt="#cap1" title=""> 
    <img src="https://www.java2s.com/style/demo/Opera.png" alt="" title=""> 
    <img src="https://www.java2s.com/style/demo/Firefox.png" alt="#cap2" title=""> 
    <img src="https://www.java2s.com/style/demo/InternetExplorer.png" alt="" title=" Support Team"> 
    <img src="https://www.java2s.com/style/demo/Google-Chrome.png" alt="" title=" Social Medias"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials