On my site, I'm trying to make my images fill the viewport width on mobile only, but with grids there's the padding, so when on mobile there's that bit of white space on both sides.
Example: On Microsoft's site, as you resize the browser the padding goes away on the main image and fills the width of the viewport, but the thumbnails keep their paddings. What I'm trying to achieve is what's happening on the main image.
Markup:
<div class="container">
<section class="row cf">
<div class="grid-full">
<article>
<img src="/path/to/image/sample.jpg" />
</article>
</div>
</section>
</div>
CSS:
.container {
max-width: 1000px;
width:92%;
margin:0px auto;
position: relative;
}
.grid-full {
float: left;
width:96.969696969697%;
margin:0 1.515151515152% 1em;
}
I've tried playing around with padding, margin, and width but I'm not successful.