0

My portfolio website uses rows to display full-width images. These look fine on my desktop and ipad but once viewed on a phone there seems to be margins on the left and right.

Here's the code:

<section class="no-padding" id="portfolio">
    <div class="container-fluid">
        <div class="row no-gutter">
            <div class="col-xs-12">
               <img src="img/focus.jpg" class="img-responsive" alt="Focus Ireland"></a>
            </div>
        </div>   
     </div> 
</section>  

The site is live at http://www.burnser.com/index.html

Any help would be most grateful. Thanks in advance.

  • Possible duplicate of [Bootstrap - Removing padding or margin when screen size is smaller](http://stackoverflow.com/questions/16410659/bootstrap-removing-padding-or-margin-when-screen-size-is-smaller) – BENARD Patrick Jan 18 '17 at 15:20

2 Answers2

0

the col-xs-12 class from Bootstrap has a padding.

padding-right: 15px;
padding-left: 15px;

That padding is set to 0 in screens bigger than 768px.

So if you want to remove the padding, you could override those properties in your css file.

Manu Obre
  • 2,254
  • 1
  • 12
  • 12
0

Need to change

.col-xs-12{
    padding-right: 15px;
    padding-left: 15px;
}

to

.col-xs-12{
        padding-right: 0;
        padding-left: 0;
    }

Currently it's only set for min-width: 768px

@media (min-width: 768px)
.no-gutter > [class*=col-] {
    padding-right: 0;
    padding-left: 0;
}
Gokul P P
  • 962
  • 8
  • 27