javascript - Responsive DIv Containing 2 images -
i working on joomla based website template called xtec www.crosstec.de not me using jquery based code inserted articles.
i trying create responsive div has 2 images in , trying entirely in css.
this trying acheive.
1) normal width screen/browser has both images each 465px wide x 507 pixel in height - side side 2 pixel gap between them centered horizontally in browser window
2) reduce screen/browser width images should both shrink proportionally until @ point of screen / browse rreaching 850px wide images should move single column , both images aligned vertically on top of each other, reduce screen / browser continue reduce proportionally in size, still centered in column.
i used code "2-column css responsive layout responsive image" as starter
my site url http://www.clickandrent.mobi , 2 images trying perform on below full width slider , above bottom 2 images.
many - martyn
please add code stylesheet, should work. tested on website , it's working:
.group { text-align: center; } .left { display: inline-block; width: 38.5%; } .left img { float: right; } .right { display: inline-block; width: 38.5%; margin-left: 3%; } .right img { float: left; } @media (max-width: 850px) { div.left { float: none; width: auto; display: block; margin-bottom: 20px; } div.left img { display: block; margin: 0px auto; float: none; } div.right { float: none; width: auto; margin-left: 0%; display: block; } div.right img { display: block; margin: 0px auto; float: none; } }
2px
gap:
25px
gap:
Comments
Post a Comment