html - How to make images appear side by side on one row on desktop, but responsive and centered above each other on mobile? -


we have 2 pages we're trying have images appear in 1 row side-by-side when viewing on desktop , tablet, responsive , centered above 1 on mobile. it's working on 1 page , not on other-- i'm assuming because images wide on pages breaks, makes me think entire code faulty. tips? suggestions?

the pages are--

http://www.vaporfresh.com/pages/retailers

http://www.vaporfresh.com/

the css--

div.jumbo { background-color: #fff; width: 100%;  margin: 6px auto; padding: 2px; text-align: center; }  .jumbo img { padding: 8px; display: inline; }  @media (max-width: 768px) {  .jumbo img {     display: block;     margin: 5px auto; } } 

the html--

<div class="jumbo"> <a href="http://www.amazon.com/gp/aag/main/ref=as_li_ss_tl?ie=utf8&amp;asin=&amp;camp=1789&amp;creative=390957&amp;isamazonfulfilled=1&amp;iscba=&amp;linkcode=ur2&amp;marketplaceid=atvpdkikx0der&amp;orderid=&amp;seller=a1zsbt0hod7th4&amp;sshmpath=&amp;tag=rawathletics-20&amp;linkid=l74xryus7rojtoxl" target="_blank" rel="nofollow"><img src="//cdn.shopify.com/s/files/1/0943/1886/files/rsz-amazon-logo.jpeg?11379810593739760604" /></a>  <a href="http://www.soap.com/buy/brand=vapor+fresh" target="_blank" rel="nofollow"><img src="//cdn.shopify.com/s/files/1/0943/1886/files/soap_logo_cmyk.jpg?14350831404106169407" /></a>  <a href="http://www.vinemarket.com/buy/brand=vapor+fresh" target="_blank" rel="nofollow"><img src="//cdn.shopify.com/s/files/1/0943/1886/files/vinemarket_logo_cmyk.jpg?14350831404106169407" /></a>  <a href="http://www.roguefitness.com/catalogsearch/result/?q=vapor+fresh" target="_blank" rel="nofollow"><img src="//cdn.shopify.com/s/files/1/0943/1886/files/roguefitness-vapor-fresh.jpg?14350831404106169407" /></a> </div> 

https://jsfiddle.net/juk6ynd4/

your code correct, work fine. looking @ site you're using

width: 100%; 

however images in grid, you'll need through , limiting sizes. example you've this:

#div1 { width: 50%; }  #div2 {  width: 100%; } 

then

<div id="div1">     <div id="div2">         div not bigger 50% due scaling of div1!     </div> </div> 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -