Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

background image for div in grid system bootstrap

.img {
    margin-right: -15px; // Remove right gap
    margin-left: -15px;  // Remove left gap
    padding-bottom: 62.5%; // ratio is 16:10
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #background #image #div #grid #system #bootstrap
ADD COMMENT
Topic
Name
3+9 =