Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
code for image gallery on adding any more images the images overlap cause the browser width is limited; according to mozilla developer tools the browser width is 1247 and height is 300

How is it possible to add more images

<html>
    <head>
        <title>Computer Science</title>        
    </head>
    <style>
        .yndr
        {
            float:left;
            animation:droyd 10s infinite;
        }
        .yndroid
        {
            width: calc(500px * 3);            
        }
        .yndroidr
        {
            width: 400px;
            overflow: hidden;
            margin: 150px auto;
            height:300px;
        }
        
        @keyframes droyd
        {
            10%
            {                
             transform: translateX(-420px);             
            }            
            20%
            {                
             transform: translateX(-840px);             
            }
            30%
            {                
             transform: translateX(-1260px);             
            }            
            40%
            {                
             transform: translateX(-840px);             
            }            
        }
    </style>         
    <body>
       <div class="yndroidr">
           <div class="yndroid">
               <div class=yndr><img src="iron.gif" width="400" height="200" alt="cy"/></div>               
               <div class=yndr><img src="airconditioner.gif" width="400" height="200" alt="cy"/></div>               
               <div class=yndr><img src="geyser.gif" width="400" height="200" alt="cy"/></div>               
               <div class=yndr><img src="battery.gif" width="400" height="200" alt="cy"/></div>               
           </div>
       </div>         
    </body>
</html>


What I have tried:

changed width and resized the image
Posted
Updated 24-Dec-19 0:44am
v3
Comments
Richard MacCutchan 24-Dec-19 6:55am    
The browser width will be as wide as the user makes it. On my screen it can be up to 1920 pixels.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900